VBÖÐÀûÓÃDataBaseÇÉÃîÉèÖÃDataReportÖеĶ¯Ì¬SQL
½üÈÕ·ÖÎöÒ»VB×öµÄ±¨±í£¬ÓÉÓÚ¶ÔVBÖ»ÊÇÁ˽⣬̸²»ÉÏÊìÁ·£¬²»¹ý¶ÔÆäË®¾§±¨±íµ¹ÓеãÈÏʶ£¬Ö®Ç°Ò²×ö¹ýÈýÁ½¸öСµÄ±¨±í £¬¼ÓÖ®¶ÔPBÖеı¨±íÁ˽â·Ç³£ÊìϤ£¬µ±Ê±ÐÅÐÄÂù´óµÄ¡£
ÏÈÊÇ¿´ÁËDataReport£¬ÓÃÓÚ»æÖƱ¨±í¸ñʽ¡£ÔÙÀ´¿´DataEnvironment£¬ÓÃÓÚ¶¨Òå»ñÈ¡µÄÊý¾ÝÁС£½«DataReportÓëDataEnvironment°ó¶¨ºó¾Í¿É»ñÈ¡Êý¾ÝÁË¡£
»ùÓÚÕâ¸ö˼·»¹ËãÊǼòµ¥£¬×ö¸ö¼òµ¥µÄ²»´ø²ÎÊýÌõ¼þµÄSQLͨ¹ýÁË¡£²»¹ý´ò¿ª±¨±íµÄ½çÃæÎÞ·¨×Ô¶¨Ò壬Èç¼Ó¸ö²éѯµÄ°´Å¥£¬ÈòéѯµÄÌõ¼þÓ뱨±íÏÔʾÔÚͬһ¸ö½çÃæÖУ¬(PBʵÏÖ¾ÍÌ«¼òµ¥ÁË)¡£Ïëµ½Ò»¸öÓëDataReport²î²»¶àͬÃûµÄActiveX-DataRepeat£¬(Ïëͨ¹ýActiveX¼ÓÔظÃDataReport£¬ÕâÑù¾Í¿ÉÔÚ×Ô¶¨Òå½çÃæÉÏÏÔʾÕâ¸öReport)ÏÈ¿´¿´ÔÙ˵£¬½áÂÛÊÇÁ½ÂëÊ¡£DataReportÓÃÓÚÉè¼Æ±¨±í£¬DatarepeatÓëDataGridÀàËÆÊý¾Ýµ×²ãת»»´¦ÀíµÄ¡£(Ö»¹ÖÓ¢ÎIJӦ¸Ã´Ó×ÖÃæÉÏ¿ÉÒÔÀí½âÕâ¸öDataRepeatÓëReportÊÇÁ½ÂëÊ£¬²»¹ýÕâÖÖ¾«ÉñÖµµÃÌᳫ£¬Ã»Óе÷²é¾Íû·¢ÑÔȨ¡£)
ÎÞ²ÎÊýµÄSQLÊÇûÎÊÌ⣬ÏÂÃæ¾ÍÊÇÓвÎÊýµÄÁË¡£·ÖÎö±ðÈ˵ijÌÐòÊǼþ¿ÉŵÄÊ£¬ÌرðÊǶÔVB²»Ê죬¼ÓÉϱðÈËʹÓõÄÁíÀà·½·¨£¬¸üÊÇһͷÎíË®¡£Õâ»ØÎÒ¾ÍÓöÉÏÁË¡£
´úÂëÖÐûÓÐÈ¥´¦ÀíDataEnvironment£¬ËäÈ»DataReport¶¼ÓëDataEnvironment°ó¶¨ÁË£¬µ«ÊôÓÚ¾²Ì¬Ê½°ó¶¨¡£Ô×÷ÕßʹÓõÄÊÇDataBase£¬Í¨¹ýOpenDatabaseÒ»¸öMDBÎļþ£¬ÔÙÔÚQueryDefs×ÓÀàÖÐÈ¥¶¯Ì¬ÉèÖÃSQL£¬ÕâÑù¾Í½«Ï൱ÓÚ¶Ô²ÎÊý´«ÈëÁË¡£¿ªÊ¼Ê±ÕÕè»»¢ÁË£¬³ÌÐò䱨´í£¬¿É¼ìË÷ºóûÓа´²éѯÌõ¼þÀ´¼ìË÷¡£DataEnvironmentÖÐÎÒ¶¨ÒåÁ˵ÄCmdText·½Ê½£¬½«±¨±íÐèÒªµÄÁж¼¸ø³öÀ´£¬Where Ìõ¼þ¸ø²»³öÀ´£¬ÒòΪÌõ¼þÊÇÔÚ½çÃæÖмÈëµÄ¡£·ÖÎöÏÂÔÓеÄDataEnvironment£¬Ê¹ÓõÄÊÇCmdTable·½Ê½£¬ÓëÄÚ²¿µÄÊÓͼֱ½Ó¶ÔÓ¦£¬¿ÉÎÒÕâÎÞ·¨¶ÔÓ¦±í£¬ÎÒµÄSQLÊǶà±í¹ØÁª¡£
“Óöµ½ÎÊÌ⣬ÄãbaiduÁËÂð?”£¬Õâ»°·Ç³£Á÷ÐС£ÄǾÍÏÈÕÒÕÒÏà¹Ø×ÊÁÏ£¬ÎÞÀµÔÀ´ÕâÃÇÈÊÐÖʹµÄÕÐÊýÌ«Æ«£¬ÎÞ¹û¡£
¼ÌÐø·ÖÎö£¬ÔÀ´ÄÇλÈÊÐÖʹÓÃÁËDataBaseÀ´ÓëReport´ò½»µÀ£¬ÄǾͲé²éQueryDefs£¬¸Ã¼¼ÊõºÃÏñʧ´«ÁËÒ»°ã£¬Ö»ÄÜÔÚMSDNÉÏ¿´µ½English°ïÖú£¬Ò²Ã»¿´µ½DataBaseÓëDataReportÏà¹ØµÄ£¬Ö»ÓжÎÑùÀýÊÇ¿ÉÒÔÓÃÀ´ÉèÖÃÒ»¸öSqlÓï¾ä¡£
»»¸ö½Ç¶È¿´ÎÊÌ⣬¼ÈÈ»¿´²»µ½ÕæÕýÒâÒåµÄ°ïÖú£¬ÄǾÍ×ÔÒÑÁ˽⣬»¹ºÃVBÖÐÓÐÕâ¸öµ÷ÊԲ鿴Æ÷£¬Debug¶¯Ì¬¸ú×ÙÔÙ¿´¿´DataBase¶ÔÏó£¬DataBaseΪһÊ
Ïà¹ØÎĵµ£º
Private Sub Form_load()
'ÅжϳÌÐòÊÇ·ñÒѾÔËÐÐ
If App.PrevInstance
Then
MsgBox "±¾³ÌÐòÒѾÔËÐУ¡", vbInformation Or vbOKOnly, "ÌáʾÐÅÏ¢"
Unload
Me
Exit Sub
&n ......
Ò»¸öCommonDialog£¬Ò»¸öCommandButton£¬Ò»¸öPictureBOX
Option Explicit
Private Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, B ......
½ñÌ칫˾ҪÇóÓÃC#д¸öÑéÖ¤Âë×é¼þ£¬ÈÃasp¿ÉÒÔµ÷Óã¬ÔÚÍøÉÏÕÒÁËÒ»¶Ñ×ÊÁÏ£¬ÖÕÓÚ¸øÎÒ¸ø¸ã³öÀ´ÁË£¬ÒòΪ±¾È˵ÚÒ»´Îд×é¼þ£¬Ò²ÊǵÚÒ»´Î·¢±íÎÄÕ£¬ËùÓпÉÄÜ˵µÄ²»ÊǺܺ㬴ó¼ÒÇë¼ûÁ¡£
csdnÉÏÓÐÕâôƪÎÄÕ£¬Ïëѧϰд×é¼þµÄ¿ÉÒÔÈ¥¿´¿´£ºhttp://blog.csdn.net/KimmKi ......
Òý×Ô£ºhttp://blog.csdn.net/yizia/archive/2006/09/19/1248669.aspx
·ÃÎÊÔ¶³ÌÊý¾Ý¿âµÄÇé¿öÓÐÒÔϼ¸ÖÖ£º
1£©·ÃÎÊÔ¶³ÌÊý¾Ý¿âµÄaccessÊý¾Ý¿â
2£©·ÃÎÊÔ¶³ÌmssqlÊý¾Ý¿â»òoracleµÈÆäËû¹ØϵÊý¾Ý¿â£¬µ«ÊÇÊý¾Ý¿âͨÐŶ˿ڱ»·À»ðǽ×èµ²»òÆäËûÍøÂçÔÒòÔì³ÉÎÞ·¨Ê¹Óøö˿Ú
±¾ÎĽöÔÚwindows2000 advance server,mdac2.8ϲâÊÔͨ¹ý£ ......
http://zhidao.baidu.com/question/33440250.html
ÔÚÄ£¿éÖÐÊäÈëÒÔÏ´úÂë
Public Declare Function sndPlaySound Lib "winmm" Alias _
"sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long
' flag uitzetten
Public Const SND_SYNC = &H0
Public Const SND_ASYNC = &H1 ......