Thanks and sorry should of posted the code first lol
The code is
-
Dim Cmd As OleDbCommand
-
Dim SQL As String
-
Dim objCmd As New OleDbCommand
-
Dim Con = New OleDbConnection("Provider=SQLOLEDB;" & db_conn_string)
-
-
SQL = "SELECT * INTO [" & lst_restor_list_confirm.Items(count) & "] FROM [odbc;Driver={Microsoft Access Driver (*.mdb)};Dbq=" & frm_restore_db.OpenFileDialog1.FileName & ";Uid=;Pwd=;].[" & lst_restor_list_confirm.Items(count) & "]"
-
-
Cmd = New OleDbCommand(Sql, Con)
-
-
objCmd = New OleDbCommand(SQL, Con)
-
Con.Open()
-
objCmd.ExecuteNonQuery()
-
-
Con.Close()
-
-
and the error i get is
System.Data.OleDb.OleDbException was unhandled
ErrorCode=-2147217865
Message="Invalid object name 'odbc;Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\db_backup_15-02-2009.mdb;Uid=;Pwd=;.tb_user'."
Source="Microsoft OLE DB Provider for SQL Server"
if it helps the sql statment shows as below when the code is running
SELECT * INTO [tb_user] FROM [odbc;Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\db_backup_15-02-2009.mdb;Uid=;Pwd=;].[tb_user]
any help you can give is thanked big time