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
Ïà¹ØÎÊ´ð£º
Ò»¸ö²éѯijÐÅÏ¢µÄASPÍøÒ³£¬Ìá½»²ÉÓõÄÊÇpost·½·¨£¬²éÕÒ½á¹ûµÄÍøÒ³±ØÐëÓÒ¼üµã»÷¡°²é¿´Ô´Îļþ¡±²ÅÄÜ¿´µ½ÕæÕý²éѯ½á¹ûÍøÒ³µÄÔ´´úÂ룬ÓÃä¯ÀÀÆ÷²Ëµ¥¿´µ½µÄÊDzéѯǰµÄÔ´´úÂë
ÓÃVBÓÐʲô°ì·¨¿ÉÒÔ»ñÈ¡µ½Õâ¸ö²éѯºóµÄÔ´´ú ......
Ï£Íû´ó¼ÒÄܹ»°ïÎÒÏÂ.¸ÐлÁË..
Ô´Âë´«ÔÚ´óÃ×ÅÌ VB6 µÄÔ´Âë http://www.damipan.com/file/3wNoKLW.html
תΪVB.NETÔ´Âë.
СµÜÍêÈ«ÊÇÐÂÊÖ ²»¶®µÄ˵.Âé·³¸÷λ°ïæһÏÂ
ÎÒµÄEMAILÊÇ:4452 ......
ÒªÓÃvb´òÓ¡Ò»ÌõÏߣ¬³¤¶ÈÊÇ100ºÁÃ×Ôõôд£¿
¹Ø×¢
VB code:
Printer.ScaleMode = vbMillimeters
Printer.Line (10, 10)-(110, 10)
Printer.ScaleMode = vbMillimeters
Print ......
"insert into user1(name,age) values('" & Text1.Text & "','" & Text2.Text & "' )"
ÎÊÌ⣺¶ÔsqlÓï¾äÖе¥¡¢Ë«ÒýºÅÄ£ºý¡£¼ÈÈ» Text1.Text¾Í±íʾ ......
ÌâÄ¿ÃèÊöÓ¦¸Ã²»ÊǺÜ׼ȷ¡£
ÏÖ×´ÊÇ£º¼ÙÈçÒ»¸öÎı¾Îļþ¹²100ÐУ¬ÄÇôÎÒÑ»·´ÎÊý×î´ó¾ÍÊÇ100×100=10000Ï£¬»¨·Ñʱ¼ä·Ç³£¶à£¬ÇëÎÊÓÐûÓа취Äܹ»Ìá¸ß¶ÔÎı¾ÎļþµÄÑ»··ÃÎÊËÙ¶È¡£·ÇÊý¾Ý¿â¼¼Êõ¡£
ÄãҪѻ·×öʲô£ ......