VBÁ¬½ÓÊý¾Ý¿â²éѯ³¬Ê±ÎÊÌâ
ÔÙVBÄ£¿éÖÐÎÒÊÇͨ¹ýÈçÏ·½Ê½À´Á¬½ÓÖ÷¿âºÍÀúÊ·¿âµÄ(ÀúÊ·¿âÊý¾ÝÁ¿´ó)
VB code:
Public Connstr As String
Public objConn As New ADODB.Connection
Public ConnHISstr As String
Public objConnHIS As New ADODB.Connection
Public Mystr As String
Public Sub ConnectToServer() 'Á¬½ÓÊý¾Ý¿â
On Error GoTo Errmsg
Connstr = "Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=" & DBName & ";Data Source=" & DBServerIP & ";User ID=" & DBLoginID & ";Password=" & DBLoginpwd & ";"
objConn.Open Connstr
ConnHISstr = "Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=" & DBHISName & ";Data Source=" & DBServerIP & ";User ID=" & DBLoginID & ";Password=" & DBLoginpwd & ";"
objConnHIS.Open ConnHISstr
Exit Sub
Errmsg:
MsgBox Err.Description & "SQL Server2005Êý¾Ý¿âÁ¬½Ó³ö´í£¬ÇëÁªÏµ¹ÜÀíÔ±£¡", vbExclamation, "Warning Info"
End
End Sub
ʹÓÃADODC£¨adoReport£©ÒÔ¼°VS FlexGridÍø¸ñ¿Ø¼þ£¨DataGridResults£©µÄDataSource·½Ê½ÏÔʾÊý¾Ý£¬µ±Óöµ½select³ö´ó±íʱ£¬¾³£³öÏÖTimeout expiredÐÅÏ¢£¬ÎÒÔõÑùÑÓ³¤VB²éѯ³¬Ê±ÉèÖ㬻òÕ߯äËû½â¾ö°ì·¨£¿
VB code
Code highlighting produced by Actipro CodeHighlighter (freeware)
http:
Ïà¹ØÎÊ´ð£º
ÎÒÓг§¼Ò×öµÄASPµÄ¼à¿ØÂ¼Ïñ£¨DVR£©µÄ¾ÖÓòÍø²¥·ÅµÄÔ´³ÌÐòÓë¿Ø¼þ£¬ÏëÒªÓÃASP.net×öÒ»¸öÊÓÆµ»Ø·ÅµÄ³ÌÐò£¨ÀûÓÃËûµÄ¿Ø¼þ£©µ«²»ÖªÈçÏÂÈ¥×ö£¬Íû¸÷λָµã¡£
ÏȸãÇå³þËûÃǵĿؼþÊÇÔõôÓõÄ,
È»ºó¾ÍÖ±½ÓÓúÃÁË.
²»¹ý,Èç ......
Printer.ScaleMode = 6
6±íʾºÁÃ×
Printer.PaperSize = vbPRPSA4
'³õÊ¼×ø±ê
x = 1
y = 4
'×î´óµÄÏß¿ð
Printer.DrawStyle = 0
Printer.Line (x, y)-(x + 132.5, y) ......
±ÈÈç½ø³Ì¼ÓÔØÐµijÌÐò¡£
ÔÚÆäÔËÐÐ֮ǰ×èÖ¹¡£
È»ºóÔÊÐíºó·ÅÐС£
±ÈÈç³ÌÐòÖ÷Îļþ·¾¶ÊÇc:\test\test.exe£¬½¨Á¢ÄÚÈÝÈÎÒâµÄÎļþc:\test\test.exe.manifest¡£
¾ÍÊDz»ÖªµÀ³ÌÐòÎļþ·¾¶¡£
ÉèÖ ......
TF1.text = " <_2_ZCHGZBH> " & MSFlexGrid1.TextMatrix(k, 1) & " </_2_ZCHGZBH> "
´ó¼ÒºÃ£¬ÎÒÓÃÉÏÃæÒ»¸ö¶«Î÷¸³Öµ TF1.text = & ......
VBżѧµÃ²»´í£¬ÏÖÔÚ´óÒ»£¬¸ßÈýµÄʱºò¾ÍѧVBÁË£¬ÏÖÔÚѧУÀï¶¼ÊÇѧC#ºÍVB.NETµÄÐֵܶࡣ¡£¡£
żҪתÐÐVB.NETÁË~µ±ÄêѧVBѧÁË2Ä꣬¶ÔVBÀïÃæµÄ³£Óú¯Êý¶¼Ê®·ÖÁ˽⡣
Select¡¢If½á¹¹¡¢For NextÑ»·¡¢µÈ¶¼Á˽⡣¡£¡£ ......