Swicth Between Database Connection Access Data Project (ADP) (1 Viewer)

bbrendan

Registered User.
Local time
Today, 02:57
Joined
Oct 31, 2001
Messages
35
Hi All,

Ok. I have built quite a complex Access ADP program to import website orders.

I have many Stored Proceedures used but they are all hard coded to the specific databases which makes it a nightmare when trying to test this ADP on a test database, becuase I have to change all the referneces. So what I was thinking was to have a table to contain the connections like

Field: [Connection]
Data: [lplivecompany1]

Then in the stored procedures I would just declare the database.

what I would like to do is make the a variable like

----------------------------------------------------
Alter Procedure "sp_ImportArmaster"

As

declare @database.dbo.armaster
set @ database = (select database_Name from connection)

Insert Into @database
(customer_code)
Select customer_code
from Customers
----------------------------------------------------

But I keep getting an error

ADO Error Must declare the variable @database

but I thought I had.
Could anyone please help me with this????

Thanks
 

Users who are viewing this thread

Top Bottom