G
Guest
I am attempting to refresh the link programatically to a Querydef that
already exists. I runs a stored procedure on the SQL Server. I want to
eliminate any prompt for the user to provide the User name and Password
because this is to be an automated process. Here is my code that I thought
would establish the link and thus allow the use of the Querydef:
sConnect = "ODBC;Description=Data Warehouse;DRIVER=SQL
Server;SERVER=D1PROD01;DATABASE=Applications;UID=dwro;Password=dwro;Trusted_Connection=yes"
Set db = CurrentDb
Set qdfSp = db.QueryDefs("spQuery")
qdfSp .Connect = sConnect
Set qdfSp = Nothing
set db - nothing
Any help is appreciated.
Mr B
already exists. I runs a stored procedure on the SQL Server. I want to
eliminate any prompt for the user to provide the User name and Password
because this is to be an automated process. Here is my code that I thought
would establish the link and thus allow the use of the Querydef:
sConnect = "ODBC;Description=Data Warehouse;DRIVER=SQL
Server;SERVER=D1PROD01;DATABASE=Applications;UID=dwro;Password=dwro;Trusted_Connection=yes"
Set db = CurrentDb
Set qdfSp = db.QueryDefs("spQuery")
qdfSp .Connect = sConnect
Set qdfSp = Nothing
set db - nothing
Any help is appreciated.
Mr B