Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

VBÖÐDataGridÎÊÌâ

ÎÒÏëÔÚ³ÌÐòµÄÒ»¿ªÊ¼£¬DataGrid²»¿É¼û£¬µÈËÑË÷Ìõ¼þÊäÈëµã»÷È·¶¨ºó£¬DataGrid²Å¿É¼û£¬ÒÔÏÂÊdzÌÐò£¬µ«ÎªÊ²Ã´DataGridʼÖÕ³ö²»À´°¡£¬

Private Sub Command1_Click()

Dim CN As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String

CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & appdisk & "gp.dll;Persist Security Info=False"

DataGrid1.Visible = Ture

  Adodc1.CommandType = adCmdText
  Adodc1.RecordSource = "select ID as ÐòºÅ,title as ±êÌâ,time as ·¢²¼Ê±¼ä,id_main_chinese as Àà±ð from fzs where title like '%" & Text1.Text & "%' AND id_main = 1 "
  Adodc1.Refresh
  Set DataGrid1.DataSource = Adodc1
  DataGrid1.Refresh

End Sub
----------------------------------------------------------------
Private Sub Form_Load()

    DataGrid1.Visible = False

End Sub
ûÓаó¶¨ÎªÊ²Ã´»¹ÒªÓà ¿Ø¼þAdodc1 £¿


ÊDz»ÊÇûÊý¾Ý  °ÑVISIblÈ¥µôÊÔÊÔ

Set DataGrid1.DataSource = Adodc1 
Adodc1.RecordSource = "select ID as ÐòºÅ,title as ±êÌâ,time as ·¢²¼Ê±¼ä,id_main_chinese as Àà±ð from fzs where title like '%" & Text1.Text & "%' AND id_main = 1 "
Adodc1.Refresh
 

VB code



Code highlighting produc


Ïà¹ØÎÊ´ð£º

ÇëºÃÐÄÈ˰ïÎÒ°ÑVBÔ´ÂëתΪVB.NET~

Ï£Íû´ó¼ÒÄܹ»°ïÎÒÏÂ.¸ÐлÁË..


Ô´Âë´«ÔÚ´óÃ×ÅÌ VB6 µÄÔ´Âë http://www.damipan.com/file/3wNoKLW.html

תΪVB.NETÔ´Âë.

СµÜÍêÈ«ÊÇÐÂÊÖ ²»¶®µÄ˵.Âé·³¸÷λ°ïæһÏÂ

ÎÒµÄEMAILÊÇ:4452 ......

VB iniÎļþдÈë ¶ÁÈ¡ - VB / »ù´¡Àà

¿´ÁËһЩVB iniÎļþдÈë¶ÁÈ¡µÄ·½·¨ µ«ÊÇ»¹ÊDz»ÖªµÀÔõôд£¬ÉÏÃæÐ´Á˺ܳ¤ ºÜ¶à£¬µ«ÊÇÎÒ²»ÖªµÀÔõôÓã¬ÎÒÏëÎÊÒ»ÏÂÔõÑùд²ÅÄÜʵÏÖÔÚTEXT1ÖÐд×Ö£¬È»ºóµãCommand1Ìá½»£¬È»ºóTEXT1ÀïÃæµÄÊý×Ö¾Íд½øINIÀïÃæ[Section]µÄKey1 ......

ÇóÖú£ºVBµ÷Óö¯Ì¬¿âÎÊÌâ - VB / »ù´¡Àà

¸÷λ´óϺ£º
  ÎÒÊǸÕѧVB£¬ÏÖÔÚÏëÓÃVBµ÷ÓÃÒ»¸ö¶¯Ì¬¿â£¬¶¯Ì¬¿âÀïÃæÓкܶຯÊý¡£ÎÒÖªµÀʹÓÃVBµ÷Óö¯Ì¬¿âµ÷Óú¯Êý£¬ÐèÒª½«Òªµ÷Óõĺ¯ÊýÔÚ³ÌÐòÖÐÉùÃ÷¼´¿É£¬µ«ÊÇÀïÃæÓкܶຯÊý£¬²»»áÿһ¸öº¯Êý¶¼ÒªÉùÃ÷°É¡£Çë¸ ......

Çóvb´óϺ¿´Ò»Ï°¡£¡£¡£¡

Private Sub Form_Load()
  recs = Adodc1.Recordset.RecordCount 'Çóµ±Ç°¼Ç¼Êý
  If recs > 0 Then 'ÒÑÓп¼Éú
  Adodc1.Recordset.MoveLast 'ÒÆµ½×îºóÒ»Ìõ¼Ç¼
  num = V ......

vbÉú³Éexe´íÎó - VB / »ù´¡Àà

±¨Õâ¸ö´í:
compile Error
sub or function not defined
ºÍÎÒÒýÓÃÕâ¸ö¿âº¯ÊýÓйØÏµÂð£¿
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias _
  "GetPrivatePr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ