V
Vinod
Hi All,
I've a reaquirement which needs to connect to external database (SQL Server
2005) and needs to create a new table in local database (access 2003) using
retrieved results from external database.
For above requirement I've written the following code:
Set qdfPass = Nothing
Set qdfPass = CurrentDb.QueryDefs("qryPass")
'//Create connection string to qrypass
qdfPass.Connect = "ODBC;DRIVER={SQL
Server};SERVER=PERSONAL-4B2728\SQLEXPRESS;DATABASE=emp;Trusted_Connection"
'//Update qrypass sql statement
qdfPass.SQL = "Select * From sales"
CurrentDb.QueryDefs.Refresh
CurrentDb.Execute "Select * Into tblTemp_Import FROM qryPass",
dbFailOnError
Set qdfPass = Nothing
I've been getting following error while executing "Select * Into
tblTemp_Import FROM qryPass", dbFailOnError
Error number '3323'
The query can not be used as a row source.
Please help me in resolving above issue by sharing your ideas and thoughts
which will be appreciated.
Advanced Thanks
Vinod
I've a reaquirement which needs to connect to external database (SQL Server
2005) and needs to create a new table in local database (access 2003) using
retrieved results from external database.
For above requirement I've written the following code:
Set qdfPass = Nothing
Set qdfPass = CurrentDb.QueryDefs("qryPass")
'//Create connection string to qrypass
qdfPass.Connect = "ODBC;DRIVER={SQL
Server};SERVER=PERSONAL-4B2728\SQLEXPRESS;DATABASE=emp;Trusted_Connection"
'//Update qrypass sql statement
qdfPass.SQL = "Select * From sales"
CurrentDb.QueryDefs.Refresh
CurrentDb.Execute "Select * Into tblTemp_Import FROM qryPass",
dbFailOnError
Set qdfPass = Nothing
I've been getting following error while executing "Select * Into
tblTemp_Import FROM qryPass", dbFailOnError
Error number '3323'
The query can not be used as a row source.
Please help me in resolving above issue by sharing your ideas and thoughts
which will be appreciated.
Advanced Thanks
Vinod