how to share connection on LAN

  • hi Iam new at this Site

    please help me

     iam connecting to SQL DataBase

     like this this is the code

    iam useing microsoft visual foxpro version 8 database application

     *********

     dsn1="Driver=SQL Server;Server=htm;WSID=HTM;DATABASE=account"

     cnn.ConnectionString =dsn1

     cnn.Open()

     MESSAGEBOX("connection OKI..",32,"Connection")

     

      ************

     I RUN MY APPLICATION FROM MY COMPUETR IT WORK GOOD BUT

     I TRY TO CONNECT TO SQL DATABASE FROM ANOTHER COMPUTER ON THE NETWORK

     I TRY TO RUN THE APPLICATION IT GIVE ME CONNECTION ERROR FAILED

     

     

    i have this error :

    OLe IDispatch exception code 0 from Microsoft OLEDB provider for ODBC Drive [Microsoft][ODBC SQL server Driver][TCP/IP sockets] Sql server does not exist or access denied

     

    thanks alot

     

  • Have a look at http://www.connectionstrings.com/ for all possible connection strings.

    Things to check:

    Servername htm is known on the other pc.

    Is your sql server configured for windows or mixed mode? If windows only, your pc is a member of a domain? If mixed mode, you will have to pass the user account & password.

  • Are you sure you are using a domain, remember that integrated authentication does not work for workgroup, because SQL Server can´t proof the identity of a remote calling client (Regardless of thoses hacks with the same passwords )

    make sure SQL Server is running and listening on the default port, if its not listening on the default port you will have to name the port in the connection string liek "Data Source=MachineName\InstanceName,portnumber"

    HTH, Jens Suessmeyer.

    ---

    http://www.sqlserver2005.de

    ---

  • What version of SQL server U try to connect to ? If it's 2000 desktop edition network connections are disabled by default. You can enable them using Server Network Utility

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply