各位好心的大哥大姐们,进来帮俺一下吧!找不到表的问题
日期:2007-08-09 荐:
各位好心的大哥大姐们,进来帮俺一下吧!找不到表的问题Private Sub Command4_Click()Dim name As StringDim ID As SingleDim msgtext As String Set g_Conn = New Connection '连接到数据库 With g_Conn .CursorLocation = adUseClient .CommandTimeout = 10 ' 连接到ACCESS数据库 .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password='';" & _ "Data Source=" & App.Path & "\" & "\jzpg.mdb" .Open End With Adoana.ConnectionString = g_Conn.ConnectionStringIf MsgBox("Are you sure?", vbYesNo, "Comfirm") = vbYes Then msgtext = "insert into khxxp values ('" & Text6.Text & "','" & Text7.Text & "','" & Text5.Text & "')" g_Conn.Execute msgtext End IfEnd Sub我编译的时候提示找不到khxxb,此表是jzpg.mdb里面的一个,为什么呀,帮帮我吧.thank you 1Adoana.ConnectionString = g_Conn.ConnectionStringAdoana.open.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password='';" & _"Data Source=" & App.Path & "\" & "\jzpg.mdb"多了个"\",比如说,app.path为c:\a,那么这个datasource为:c:\a\\jzpg.mdb!!而且如楼上的,你没有建立连接.好像还有点毛病
标签: