Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : vb

VBÖд¦Àí¼ÓÁËÃÜÂëµÄMDBÎļþ

µ±MDB Îļþ¼ÓÁËÃÜÂ룬ֱ½ÓÓÉ   Access   ´òÓ¡MDBÎļþʱ£¬»á³öÏÖÃÜÂë¶Ô»°¿ò£¬Ñ¯ÎÊÃÜÂë¡£µ«ÊÇÈôÒªÓÉ   VB   ³ÌÐòÖдòÓ¡£¬±Ø須¸ü¸Ä   VB³ÌÐòÖдò¿ªMDBÎļþµÄÖ¸Á·ñÔò»á³öÏÖ´íÎóÐÅÏ¢£¡ÒÔÏÂÕë¶Ô¸÷ÖÖÇé¿ö£¬·Ö別¼ÓÒÔ˵Ã÷£º  
   
  1¡¢   ʹÓà   DAO   ÃüÁî´ò¿ªMDBÎļþ£ºOpenDatabase    
  ÈôÒªÓɳÌÐòÖдò¿ª£¬ÃüÁîÈçÏ£º  
  Set   DB   =   OpenDatabase(DatabaseName,   False,   False,   ";Pwd=ÃÜÂë")  
  ʵÀý£º  
  Dim   db   As   Database  
  Set   db   =   OpenDatabase("C:\db1.mdb",   False,   False,   ";Pwd=1")  
  ÈôҪʹÓà   Data   ¿Ø¼þ£¬É趨·½·¨ÈçÏ£º  
  1¡¢É趨   DatabaseName   ÊôÐÔ   (MDBÎļþÃû³Æ   /   º¬Â·¾¶)  
  2¡¢É趨   Connect   ÊôÐÔ£¬將Ô¤ÉèµÄ×Ö´®   "Access"   ¸Ä³É   ";Pwd=ÃÜÂë"   ......

ÔÚvbÖÐʹÓÃIphlpapi.dll»ñÈ¡ÍøÂçÐÅÏ¢ µÚÎåÕ ½áÊøÓï

¡ù==================================================================
¡ù±¾Á¬ÔØÎÄÕÂ˵Ã÷£º
¡ù1¡¢Á¬ÔØÊ×·¢ÓÚ¡¶Èí¼þ±¨¡·£¨http://www.sweek.com£©2006Äê21ÆÚ£¨2006Äê5ÔÂ22ÈÕ£©£»
¡ù2¡¢´Ë´ÎÍøÉÏÁ¬ÔزÉÓõÄÊÇÔ­¸å¼þ½á¹¹£¬ÄÚÈÝÓ롶Èí¼þ±¨¡··¢±íÂÔÓв»Í¬£»
¡ù3¡¢Ð»¾ø³ý¡¶Èí¼þ±¨¡·¼°ÆäÏà¹Ø¿¯ÎïÖ®ÍâµÄ´«Í³Ã½Ì岿·Ö»òÈ«²¿×ªÔØ£»
¡ù4¡¢Ð»¾øÈκÎÊÕ·ÑýÌå¡¢ÍøÂçתÔØ£»
¡ù5¡¢Ô­×÷Õߣºuruseibest £¬blog£ºhttp://blog.csdn.net/uruseibest£»
¡ù6¡¢ÈçÓÐÆäËüÒÉÎÊ£¬ÇëÁªÏµ×÷Õߣ»
¡ù7¡¢ÈçÓÐתÔØ£¬±ØÐëÁ¬Í¬±¾ËµÃ÷Ò»²¢·¢±í£¬·ñÔò½«×·¾¿×ªÔØÕßÔðÈΡ£
¡ù======================================================================
µÚÎåÕ ½áÊøÓï
Windows×ÔÉíÌṩÁËһЩÔÚÃüÁîÌáʾ·ûϲÙ×÷µÄÃüÁî¿ÉÒÔ»ñµÃÍøÂçÐÅÏ¢£¬±ÈÈçIpconfig¡¢ArpµÈ£¬¶¼¿ÉÒÔʹÓÃIphlpapi.dllµÄº¯ÊýÀ´»ñµÃͬÑùЧ¹û£¬ÎÒÃÇ¿ÉÒÔʹÓÃIphlpapiº¯ÊýÀ´ÖÆ×÷×Ô¼ºµÄIpconfig³ÌÐò¡¢Arp³ÌÐò»òÕß±ðµÄ³ÌÐò¡£
ÒÔÉÏ×ܽáÁËIphlpapi.dllËùÌṩ´ó²¿·Öº¯Êý£¬ËäÈ»ÒÔÉϺ¯ÊýÏêϸµÄ˵Ã÷ºÍÓ¦Óö¼ÊǶÔVb³ÌÐòÔ±µÄ£¬µ«ÊÇÒ²²»Ê§ÎªC³ÌÐòÔ±µÄ¸¨Öú×ÊÁÏ¡£ÎÄÕÂÖÐËù¸½´úÂë¾ùÊÇÔ´³ÌÐòµÄ¹Ø¼ü´úÂ룬Դ³ÌÐò¸½Îĺó¡£ÓÉÓÚ¸÷È˵ĵçÄÔÍøÂçÇé¿ö²»Ò»£¨±ÈÈçÎҵĵçÄÔ¾ ......

vb °Ù¶È×¢²áµÇ¼

   ×î½üÔÚÀûÓÃvb±àд¹ØÓڰٶȿռäÑéÖ¤Âë×Ô¶¯Ê¶±ðµÄ³ÌÐò£¬µ«ÊÇһֱûÄÜʵÏÖ£¬Ô­Òò¾ÍÊÇÎÒµÄˮƽ»¹ÊÇÌ«²Ë¡£ÓÚÊÇ´ÓÍøÉÏÑ°ÕÒÁ˺ܶà¹ØÓÚÑéÖ¤Âëʶ±ðµÄÔ´´úÂ룬´ÓÀïÃæѧµ½²»ÉÙ¶«Î÷£¬ËãÊÇû°×ŬÁ¦°É¡£ÔÚ´Ë×ܽáÒ»ÏÂѧµ½µÄ¶«Î÷£¬Ï£ÍûÄܶÔÅóÓÑÃÇÓÐЩ°ïÖú°É¡£
  Ê×ÏÈÕûÀíϱàдÑéÖ¤Âëʶ±ðµÄ˼·°É£º
  1£¬Ê×Ïȱàд»ñÈ¡ÑéÖ¤ÂëͼƬµÄ³ÌÐò£¬ÒÔ»ñÈ¡°Ù¶È¿Õ¼äÁôÑÔΪÀý£¨×¢£ºÒÔϽÔÒ԰ٶȿռäÁôÑÔÑéÖ¤ÂëΪÀý£©¡£
  2£¬Æä´Î±àд´¢´æÑéÖ¤ÂëͼƬµÄ³ÌÐò£»
  3£¬½«Í¼Æ¬ÖеÄÏñËؽøÐйéÀֻ࣬Çø·Ö°×É«ºÍºÚÉ«£¬²¢½«ºÚÉ«µÄ×ø±ê¼Ç¼£»
  4£¬Çø·ÖËĸöÑéÖ¤Âë µÄλÖ㬽«Ã¿¸öÑéÖ¤ÂëµÄ×ø±ê¹éµ½µ¥¶ÀµÄÊý×éÖÐÈ¥£»
  5£¬½«Ã¿¸öÑéÖ¤ÂëµÄÏßÌõ½øÐÐƽ¾ù»¯£¬²¢½«ÑéÖ¤ÂëµÄ ......

VBʹÓÃADODB²Ù×öÊý¾Ý¿â

ÏÂÃæÊÇÎÒËùÕÆÎÕµÄʹÓÃADO¶ÔÊý¾Ý¿â²Ù×öµÄһЩ³£Ó÷½·¨£¬Ö÷ÒªÊÇÌṩ¸ø³õѧÕß×öΪ²Î¿¼£¬Óв»¶ÔµÄµØ·½ÇëÖ¸Õý¡£ÈçÓв¹³ä²»Ê¤ÈÙÐÒ
×¼±¸¹¤×ö
========
À´Ô´£ºwww.va1314.com/bc
Dim conn As New  ADODB.Connection  '´´½¨Ò»¸ö Connection ʵÀý£¬ÔÚÕâÀïʹÓÃNewµÈÓÚ½«DimºÍSetºÏ²¢ÎªÒ»¶Î´úÂëÖ´ÐÐ
Dim rs As ADODB.Recordset    '´´½¨Ò»¸ö Recordset ʵÀý£¬²»Ê¹ÓÃNew ÊÇÒòΪ£¬¾­³£ÐèÒªÖظ´Ê¹ÓÃSet£¬Òò¶øû±ØÒªÔÚÕâÀïʹÓÃ
Dim CnStr As String, Sql As String  '´´½¨Á½¸ö×Ö·û´®±äÁ¿·Ö±ð´æ·ÅÁ½¸ö¼¯ºÏµÄSQLÓï¾ä´úÂë¶Î
1¡¢×°ÔØÊý¾Ý¿â(²»ÊôÓÚRecordset¼¯ºÏ)
=============
Dim FileNamw$, DbIp$, DbName$, DbUser$, DbPw$
'ÒÔÉÏ5¸ö×Ö·û´®±äÁ¿·Ö±ð±íʾÎļþ·¾¶ºÍÎļþÃû¡¢Êý¾Ý¿âµØÖ·¡¢Êý¾Ý¿âÃû¡¢Êý¾Ý²Ù×öÔ±Óû§Ãû¡¢²Ù×öÔ±ÃÜÂë
FileName = App.Path & "'Êý¾Ý¿âÃû'"
DbIp = "Êý¾Ý¿âµØÖ·"
DbName = "Êý¾Ý¿âÃû"
DbUser = "Êý¾Ý²Ù×öÔ±Óû§Ãû"
DbPw = "²Ù×öÔ±ÃÜÂë"
'ÒÔÉϱäÁ¿¸ù¾ÝÊý¾Ý¿âÀàÐ͵IJ»Í¬¶ø²»Í¬£¬ÓпÉÄÜÖ»ÐèÒª1ÖÁÁ½¸ö±äÁ¿
'1)Á¬½ÓAccessÊý¾Ý¿â:
'-------------------
CnStr = "PROVIDER=microsoft.jet.oledb.3.51;persi ......

VB FTPÉÏ´«ºÍÏÂÔØÄ£¿é

Option Explicit
Private Const INTERNET_OPEN_TYPE_DIRECT = 1
Private Const scuseragent = "vb wininet"
Private Const INTERNET_FLAG_PASSIVE = &H8000000
'µ÷ÓÃÉèÖû·¾³
Private Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
'Á¬½Ó·þÎñÆ÷
Private Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
'ÉÏ´«º­Êý
Private Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, ByVal lpszRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Private Declare Function FtpGetFile Lib "wininet.dl ......

VBÖÐ Replace º¯Êý

VBÖÐ Replace º¯Êý
ÃèÊö
·µ»Ø×Ö·û´®£¬ÆäÖÐÖ¸¶¨ÊýÄ¿µÄij×Ó×Ö·û´®±»Ì滻ΪÁíÒ»¸ö×Ó×Ö·û´®¡£
Óï·¨
Replace(expression, find, replacewith[, compare[, count[, start]]])
Replace º¯ÊýµÄÓï·¨ÓÐÒÔϲÎÊý£º
²ÎÊý ÃèÊö
expression ±ØÑ¡¡£×Ö·û´®±í´ïʽ£¬°üº¬ÒªÌæ»»µÄ×Ó×Ö·û´®¡£ 
find ±ØÑ¡¡£±»ËÑË÷µÄ×Ó×Ö·û´®¡£
replacewith ±ØÑ¡¡£ÓÃÓÚÌæ»»µÄ×Ó×Ö·û´®¡£
start ¿ÉÑ¡¡£expression ÖпªÊ¼ËÑË÷×Ó×Ö·û´®µÄλÖá£Èç¹ûÊ¡ÂÔ£¬Ä¬ÈÏֵΪ 1¡£
count ¿ÉÑ¡¡£Ö´ÐÐ×Ó×Ö·û´®Ìæ»»µÄÊýÄ¿¡£Èç¹ûÊ¡ÂÔ£¬Ä¬ÈÏֵΪ -1£¬±íʾ½øÐÐËùÓпÉÄܵÄÌæ»»¡£
compare ¿ÉÑ¡¡£Ö¸Ê¾ÔÚ¼ÆËã×Ó×Ö·û´®Ê±Ê¹ÓõıȽÏÀàÐ͵ÄÊýÖµ¡£ÓйØÊýÖµ£¬Çë²ÎÔÄ“ÉèÖÔ²¿·Ö¡£
 
ÉèÖÃ
compare ²ÎÊý¿ÉÒÔÓÐÒÔÏÂÖµ£º
³£Êý Öµ ÃèÊö
vbBinaryCompare 0 Ö´Ðжþ½øÖƱȽϡ£
vbTextCompare 1 Ö´ÐÐÎı¾±È½Ï¡£
vbDatabaseCompare 2 Ö´ÐлùÓÚÊý¾Ý¿â£¨ÔÚ´ËÊý¾Ý¿âÖÐÖ´ÐбȽϣ©Öаüº¬µÄÐÅÏ¢µÄ±È½Ï¡£
 
·µ»ØÖµ
Replace ·µ»ØÒÔÏÂÖµ£º
Èç¹û Replace ·µ»Ø
expression ΪÁ㳤¶È Á㳤¶È×Ö·û´® ("")¡£
expression Ϊ Null ´íÎó¡£
find ΪÁ㳤¶È expression µÄ¸±±¾¡£
replacewith ΪÁ㳤¶È expres ......
×ܼǼÊý:380; ×ÜÒ³Êý:64; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [1] [2] [3] [4] 5 [6] [7] [8] [9] [10]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ