Setting ADP on another computer

R

Roy Goldhammer

Hello there.

I've just started using An ADP.

On my computer i created the connection to sql server when i started
working.

Now i need to go to another computer when the sql server is installed on it
as client and i'm going to move the database to him.

On the other computer the connetion declerations will be diffrent then my
computer so the adp won't work.

How can I create the connection on adp by my self using code?
 
V

Van T. Dinh

I am not sure of the question from your post but the
following change the connection (tested in AXP Debug
window) on my ADP:

CurrentProject.OpenConnection "Provider=SQLOLEDB;
Data Source=SQLServerName;
Initial Catalog=DatabaseName;Integrated Security=SSPI"

(all on 1 line)

Integrated Security=SSPI means using Trusted_Connection.

Actually, if you use Trusted_Connection, I don't think you
have to change the connection at all because all the
details are the same.

HTH
Van T. Dinh
MVP (Access)
 
B

BJ Freeman

You can do this thru the connect dialog as well.
to get familiar how to programmatically do it.
open the vba editor intermediate widow and paste this.
?currentproject.Connection.ConnectionString

then hit enter

all you have to do is change the parms and put it back in the same var.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top