Hi all,
I am trying to transfer data from .mdb file to SQL server..
I tried linking the table using ODBC but I am not able to access it to insert records..
I created a DSN-Less connection and am able to connect to the SQL database.. however am getting error while I try to xfer the data..
Error 3170: Could not find installable ISAM.
My code is as below:
-------------------------------
stConnect1 = "OBDC;Driver={SQL Server Native Client 10.0} ;Server=" & stServer & ";Database=" & stDatabase & "; UID=" & stUsername & ";PWD=" & stPassword & ";"
Dim db As Database, tbldef As DAO.TableDef
'
Dbname = "amd_temp.accdb"
dd = "C:\Documents and Settings\MSC055\My Documents\Auto-Amd\" & Dbname
Set db = OpenDatabase(dd)
For Each tbldef In db.TableDefs
sXferTable = "Amd_SI_Det"
sTblNm = tbldef.Name
If sTblNm = "dbo_Amd_SI_Details_Temp" Then
Set td = db.CreateTableDef("newTable")
td.Connect = stConnect1
td.SourceTableName = "Amd_SI_Det"
db.TableDefs.Append td
End If
Next tbldef
------------------
Please help...
I am trying to transfer data from .mdb file to SQL server..
I tried linking the table using ODBC but I am not able to access it to insert records..
I created a DSN-Less connection and am able to connect to the SQL database.. however am getting error while I try to xfer the data..
Error 3170: Could not find installable ISAM.
My code is as below:
-------------------------------
stConnect1 = "OBDC;Driver={SQL Server Native Client 10.0} ;Server=" & stServer & ";Database=" & stDatabase & "; UID=" & stUsername & ";PWD=" & stPassword & ";"
Dim db As Database, tbldef As DAO.TableDef
'
Dbname = "amd_temp.accdb"
dd = "C:\Documents and Settings\MSC055\My Documents\Auto-Amd\" & Dbname
Set db = OpenDatabase(dd)
For Each tbldef In db.TableDefs
sXferTable = "Amd_SI_Det"
sTblNm = tbldef.Name
If sTblNm = "dbo_Amd_SI_Details_Temp" Then
Set td = db.CreateTableDef("newTable")
td.Connect = stConnect1
td.SourceTableName = "Amd_SI_Det"
db.TableDefs.Append td
End If
Next tbldef
------------------
Please help...