Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String for a Re-distributable

Status
Not open for further replies.

cwarner

Programmer
May 9, 2003
46
0
0
GB
Hi,

I want to create an Access front-end w/
SQL server back-end. Right now I have
SQL server Development version and have
set up my server name as "cwsqlserver".

My question is: if I were to try to
replicate this system on another machine,
with a real version of SQL Server 7.0,
how would the user define the server name
so that my software wouldn't have to change
the Data Source = "cwsqlserver" value?
Or, could I somehow get the value of the
servername from the user's computer?

Thanks in advance,
Christy the Confused.
 
If you plan on having them run the SQL Server and the access database on the same machine use (local) or localhost.

Otherwise, prompt them for the machine name and save the setting.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
I do plan on having them run the Access DB and SQL Server on the same machine..... so all I would have to do is specify "Data Source=Local" in my connection string?

Thanks,
Christy.
 
I'd use "Data Source=localhost" but yeah. That should do the trick. Every machine out there (unless someone has modified there hosts file) known that localhost is the local machine.

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top