vb ado¿Ø¼þ²éѯÎÊÌâ
Adodc2.RecordSource = "select * from ±ÏÒµÖ¤ÐÅÏ¢±í where ÐÕÃû in('" & List1.List(List1.ListIndex) & "')"
Õâ¾ä´úÂëÔõô´íÁ˰¡ ÎÒÏëʵÏÖ²éѯÃû×ÖÔÚlistboxÄÚµÄËùÓÐÈËÔ±ÐÅÏ¢
VB code:
Dim i As Integer
Dim strNames As String
strNames = ""
For i = 1 To List1.ListCount
strNames = ",'" & List1.Text & "'"
Next i
strNames = Right(strNames, Len(strNames) - 1)
If Len(strNames) = 0 Then
Exit Sub
End If
Adodc2.RecordSource = "select * from ±ÏÒµÖ¤ÐÅÏ¢±í where ÐÕÃû in(" & strNames & ")"
in()À¨ºÅÄڵĸ÷ÔªËØÒªÓöººÅ¸ô¿ª
VB code:
Private Sub Command1_Click()
Dim i As Long, strTmp As String
For i = 0 To List1.ListCount-1
strTmp = IIf(strTmp = "", "'" & List1.List(i) & "'", strTmp & ",'" & List1.List(i) & "'")
Next i
Adodc2.RecordSource = "select * from ±ÏÒµÖ¤ÐÅÏ¢±í where ÐÕÃû in(" & strTmp & ")"
End Sub
Ïà¹ØÎÊ´ð£º
Printer.ScaleMode = 6
6±íʾºÁÃ×
Printer.PaperSize = vbPRPSA4
'³õÊ¼×ø±ê
x = 1
y = 4
'×î´óµÄÏß¿ð
Printer.DrawStyle = 0
Printer.Line (x, y)-(x + 132.5, y) ......
"insert into user1(name,age) values('" & Text1.Text & "','" & Text2.Text & "' )"
ÎÊÌ⣺¶ÔsqlÓï¾äÖе¥¡¢Ë«ÒýºÅÄ£ºý¡£¼ÈÈ» Text1.Text¾Í±íʾ ......
²ËÄñѧVB,¸÷λ´óÏÀÄܰïÖúÎÒô£¬ÎÒµÄQQÊÇ544508194£¬mail. huguyue619@163.com
¿ÒÇë¸÷λ´óÏÀ¼ÓÎÒ£¬Ö¸µãСµÜÒ»¶þ
Çë¾³£¹â¹Ë±¾ÂÛ̳,ÓÐÒÉÄÑÖÚ¶à¸ßÊÖ¶¼»á¾¡Á¦.
¶¯ÊÖʵ¼ùд´úÂë,¾³£¹â¹Ë±¾ÂÛ̳ä¯ÀÀÓëѧϰ.
......
ÌâÄ¿ÃèÊöÓ¦¸Ã²»ÊǺÜ׼ȷ¡£
ÏÖ×´ÊÇ£º¼ÙÈçÒ»¸öÎı¾Îļþ¹²100ÐУ¬ÄÇôÎÒÑ»·´ÎÊý×î´ó¾ÍÊÇ100×100=10000Ï£¬»¨·Ñʱ¼ä·Ç³£¶à£¬ÇëÎÊÓÐûÓа취Äܹ»Ìá¸ß¶ÔÎı¾ÎļþµÄÑ»··ÃÎÊËÙ¶È¡£·ÇÊý¾Ý¿â¼¼Êõ¡£
ÄãҪѻ·×öʲô£ ......
ÎÒÓÃC#дÁËÒ»¸öCOM¡£
ÆäËûÓУ²¸öÀ࣬һ¸öÀà¾ÍÊÇÆÕͨ·½·¨¡£µ÷ÓÃûÎÊÌâ¡£
ÁíÒ»¸öÀàÊÇÓû§¿Ø¼þ¡£ÎÒÔÚVBÖÐÈçºÎ°ÑÄǸö¿Ø¼þÏÔʾ³öÀ´£¿
VBµ÷COMÖУ¬COM ÊǸö¿Ø¼þ¡£
лл¸ßÊÖÖ¸µã¡£
......