Microsoft
Software
Hardware
Network
Question : variant for ServerName?
I do have a lot of forms where I always have following instructions
Set c = New ADODB.Connection
c.ConnectionString = "Driver={SQL Server};Server=Kongta_SQL;
Database=K
ongta"
c.Open
and I think, when I once will relocate the server/client to another network with different ServerNames, it's hard to change everywhere the ServerName & Database. I thought by placing at the top of the form
Dim Srv as Variant
Set Srv = Kongta_SQL
Set c = New ADODB.Connection
c.ConnectionString = "Driver={SQL Server};Server=Srv;Databas
e=Kongta"
c.Open
would make it more easy to change a possible ServerName but didn't work. Any idea what would be best? I do have SQL2008 backend and Access07.accdb frontEnd
thx
Kongta
Answer : variant for ServerName?
Dim Srv as Variant
Srv = "Kongta_SQL"
Set c = New ADODB.Connection
c.ConnectionString = "Driver={SQL Server};Server=" & Srv &";Database=Kongta"
c.Open
Random Solutions
Companyweb keeps promoting administrator for username and password
Who is logged into my access database now?
Need some help with printing PrintDialogbox
'0' is not a valid value for 'value'. 'value' should be between 'minimum' and 'maximum'.
access update set
VBA Excel: how to force sheet recalculating
Why do pivot tables continually corrupt excel sheets?
sql average syntax
SLOW DATA ACCESS TO WINDOWS 2008 R2 VIRTUAL
How do I use RecordSelectionFormula to pass dates via VS 2005 to Crystal report 2008?