New ADP Server Connection

  • Thread starter Thread starter Randy Faulkner
  • Start date Start date
R

Randy Faulkner

I'm moving the ADP SQL database to a new server. Once
this is done, the old server will not exist. Will I be
able to reconnect my ADP project to the new server.
Thanks.
 
Well, knock on my head. I probably won't be able to get
into the ADP file to change the "connection" server option
at all once the original server is not available. Or will
I? So perhaps I *am* back to the same question!
 
Hello Randy:
You wrote in conference microsoft.public.access.adp.sqlserver on Sun, 6 Jun
2004 13:44:26 -0700:

RF> Well, knock on my head. I probably won't be able to get
RF> into the ADP file to change the "connection" server option
RF> at all once the original server is not available.

There will be a timeout, then it will say it could't connect, then you will
be able to specify the new server.


Vadim
 
Well, knock on my head. I probably won't be able to get
into the ADP file to change the "connection" server option
at all once the original server is not available. Or will
I? So perhaps I *am* back to the same question!

I run this code from my default form (one could use an AutoExec macro as
well, I assume, but I never have):

Public Sub LetConnectionString()
With CurrentProject
If Not .IsConnected Then
.OpenConnection ("PROVIDER=SQLOLEDB.1;" _
& "INTEGRATED SECURITY=SSPI;" _
& "PERSIST SECURITY INFO=FALSE;" _
& "INITIAL CATALOG=NewDatabase;" _
& "DATA SOURCE=NewServer;" _
& "Use Procedure for Prepare=1;" _
& "Auto Translate=True")
End If
End With
End Sub

This chugs along a bit the first time it connects to the new server, but
after that Access saves the connection string and all's well. (I think the
Persist Security line is redundant with Integrated Security but as I
sometimes use an SQL login I leave it there as a precaution.)
 
Back
Top