Results 1 to 6 of 6
  1. #1
    Join Date
    May 2006
    Posts
    4

    Unanswered: Different Server Names

    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.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Ed

    Welcome to DBForums

    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".
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    May 2006
    Posts
    4
    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?

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    May 2006
    Posts
    4
    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

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •