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
i copied the mddata file from 1 exchange server to another, mounted the mailbox file, but can't see my mail
Outlook 2007 won't connect to my Exchange 2010 server using Outlook Anywhere
How to use a module when referencing a calander.
WinXP Offline Files - Disaster Recovery
How do you show deadlocks in SQL Server 2008?
Disable Enter key in Datagrid
Difference between Server 2003 Appliance edition and server 2003 R2
SQL Reporting Services - Format Datetime {0:D} culture?
DTS on SQL2008
SQL statement (left join) not working as expected