VB.NETѹËõACCESSÊý¾Ý¿â
'´´½¨Êý¾Ý¿â
Private Sub Create(ByVal mdbPath As String)
If File.Exists(mdbPath) Then
Throw New Exception("Ä¿±êÊý¾Ý¿âÒѾ´æÔÚ£¬ÎÞ·¨´´½¨")
End If
mdbPath = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + mdbPath
Dim cat As ADOX.Catalog = New ADOX.Catalog()
cat.Create(mdbPath)
End Sub
'''' <summary>
'''ѹËõÐÞ¸´Êý¾Ý¿â
''' </summary>
''' <param name="mdbPath"> ±»Ñ¹ËõµÄÊý¾Ý¿â·¾¶+Êý¾Ý¿âÎļþÃû</param>
''' <remarks></remarks>
Public Sub Compact(ByVal mdbPath As String)
'If Not File.Exists(mdbPath) = False Then '¼ì²éÊý¾Ý¿âÊÇ·ñÒÑ´æÔÚ
' Throw New Exception("Ä¿±êÊý¾Ý¿â²»´æÔÚ£¬ÎÞ·¨Ñ¹Ëõ")
'End If
Dim temp = GetSysDatePartTime()
Dim FilePath As String = mdbPath.Substring(0, mdbPath.LastIndexOf("\") + 1)
Dim DbFileName As String = mdbPath.Substring(mdbPath.LastIndexOf("\") + 1, mdbPath.Length - mdbPath.LastIndexOf("\") - 1)
File.Copy(mdbPath, FilePath + "DbBak\Bak" + temp + ".mdb", True)
Dim StrProvid As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Dim jt As JRO.JetEngineClass = New JRO.JetEngineClass()
jt.CompactDatabase(StrProvid + mdbPath, StrProvid +
Ïà¹ØÎĵµ£º
¼ÙÉèNews±íÖÐÓÐÒ»¸öÊôÐÔPassed£¬Êý¾ÝÀàÐÍÊÇ“ÊÇ/·ñ“
1,¶Á²Ù×÷£ºstring str="select * from News where Passed=True";(access)¶Á“ÊÇ“²Ù×÷¡£
string str="select * from News where Passed=False";(access)¶Á“·ñ“²Ù×÷¡£
2,д²Ù×÷£º
string str="Delete from News wher ......
Microsoft AccessÊÇÒ»ÖÖ¹ØϵʽÊý¾Ý¿â£¬¹ØϵʽÊý¾Ý¿âÓÉһϵÁбí×é³É£¬±íÓÖÓÉһϵÁÐÐкÍÁÐ×é³É£¬Ã¿Ò»ÐÐÊÇÒ»¸ö¼Ç¼£¬Ã¿Ò»ÁÐÊÇÒ»¸ö×ֶΣ¬Ã¿¸ö×Ö¶ÎÓÐÒ»¸ö×Ö¶ÎÃû£¬×Ö¶ÎÃûÔÚÒ»¸ö±íÖв»ÄÜÖظ´¡£ ¡¡¡¡
±íÓë±íÖ®¼ä¿ÉÒÔ½¨Á¢¹Øϵ£¨»ò³Æ¹ØÁª£¬Á¬½Ó£©£¬ÒÔ±ã²éѯÏà¹ØÁªµÄÐÅÏ¢¡£AccessÊý¾Ý¿âÒÔÎļþÐÎʽ±£´æ£¬ÎļþµÄÀ©Õ¹ÃûMDB¡£ ¡¡¡¡
......
½ñÌìupdate accessÊý¾Ý¿âʱ£¬Ê¹ÓÃÁ˲ÎÊý»¯µÄ·½Ê½£¬½á¹û²»±¨´í£¬µ«ÊÇÊý¾ÝҲûÓиüС£¾¹ýgoogle·¢ÏÖaccessʹÓòÎÊý»¯Ê±£¬²ÎÊýλÖñØÐëºÍ¸³ÖµË³ÐòÏàͬ²ÅÐУ¬·ñÔò¸üÐÂʱ¾Í»á³öÏÖÊý¾ÝÎÞ·¨¸üе«ÊÇÒ²²»±¨´íµÄ¹ÖÏÖÏó¡£
ÀýÈç:update tablename set [a]=@a,[b]=@b ......
Ê®Ììѧ»áASP.net֮ʵսϵÁУ¨C#ºÍVb.netË«°æ±¾£©
µÚÒ»Ìì
ÎÒÈÏΪASP.NET±ÈASPÄѺܶ࣬ϣÍû´ó¼Ò×öºÃ×¼±¸¡£ÄÑÄÑÔÚʵÏÖͬһ¸öЧ¹ûÓкܶ෽·¨£¬´ó¼Ò»òÐí»áÒÉ»ó¡£Ê®Ììѧ»áϵÁн̳̻áÇåÎúµÄд³ö¸÷ÖÖ·½·¨£¬Èôó¼ÒÄÜÉÙÒ»µã¿²¿À¡£ÔÚASPÀïÃ棬´ó¼Ò¼¸ºõ¶¼ÊÇʹÓÃVB£¬Êý¾Ý¿âÂҲÎÞ·ÇÊÇSQLºÍACCESS¡£ÔÚASP.NETÀïÃ棬Êý¾Ý¿â»¹ÊÇÕ ......
Ç°¼¸ÈÕ£¬Óиö¸çÃÇ˵ÓкܶàµçÓ°£¬ÎÊÎÒÒª²»Òª£¿ÎÒ¾ÍÈÃËûÒ»¸öÒ»¸öµÄд¹ýÀ´£¬ÈøçÃÇÀÛ¸ö²»Çá¡£ËùÒÔ¾ÍÏë¼òµ¥Ð´¸ö³ÌÐò£¬»ñÈ¡Ò»ÏÂÎļþ¼ÐÏÂÃæµÄËùÓÐÎļþÃû³Æ£¬ÕâÑù¾Í¿ÉÒÔ½ÚÊ¡ºÜ¶àʱ¼äÁË¡£
Èí¼þÄØ£¬ÎÒÒѾÉÏ´«µ½ÍøÕ¾ÁË£ºhttp://download.csdn.net/source/1802599
vb°æ±¾Ä¿Â¼»ñÈ¡Æ÷ 1.0£¨Áú¾í·ç³öÆ·£©
˵Ã÷£º
1.Ñ¡ºÃĿ¼ºó£ ......