Hello,
I am using ADO controls for MSSQL Database. The server name on my machine is different from the server name on the machine where i am running my application. When i make changes to my application, i have to rebuild the connection on my ADO Control. Is there a way to create a server name on my developement machine to match the server name where i run my application?
Would appreciate any help.Hi Ed
Welcome to DBForums :D
Don't bother buggering about with instance names. Just create some control procedure in your front end code that works out "If I am running in development mode on this machine connect to server A, otherwise connect to server B".|||hello pootle flump
thanks for the reply.
i have created a variable which contains the datasource string. i change the datasource string when on development with my machines servername and switch the servername to the working machine. it displays a message that it cant find the server. is there something i missed?|||Which one displays the message? What is your connection string? Are either of the instances SQL Server Express? Have you installed Visual Studio 2005\ 2003 on your workstation?|||pDataSource$ = "Development"
pUserId$ = "sa"
pConnectionString$ = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" + pUserId$ + ";Initial Catalog=Ormon;Data Source=" + pDataSource$
ADOControl.ConnectionString = pConnectionString$
when i want to run the application in the actual environment i simply change the pDataSource$ value to "Actual"
unfortunately, the "server cannot be found" error occurs|||Can you connect to either? You are not specifying a password for sa. Also, sa is a very poor choice for a login for an application.
Please also look at my questions again - you missed a couple.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment