Client Server connectivity on SQL Server 2000 Enterprise Edition

  • Hello,

    I am facing a typical problem..

    We are developing a school management system using SQL Server 2000 enterprise edition and Ms Visual Studio 6.0

    For connecting to SQL Server database we are using ODBC-DSN.

    On the machine on which SQL Server database is installed DSN is easily created.

    But when creating DSN on other clients it gives error, " server does not exist".

    I am not good at client server conectivity in SQL Server.

    Can anyone give step by step description.

    Early answer is appreciated.

    Best regards

    Rohit Gupta

     

  • in the create a new DSN dialogue box

    at the server combo box type the IP address of the server instead of the server name.

    again if it won't works

    go to start --> programs --> ms sql server --> client network utility

    in the alias tab add the TCP/IP alias

    Regards,
    Easwar

  • I prefer the DNS-less connection to a DSN. Maintenance of a DSN at the client is too much work.

    ' DSN-less Connection Example

    Dim moConn As ADODB.Connection ' Module level variable

    '

    Function OpenConnection(sServer AS String, sDatabase As String, sLogin As String, sPassword As String) As Boolean

        Dim sConnect As String

        'Assume failure.

        OpenConnection = False

        Set moConn = New ADODB.Connection

        moConn.ConnectionTimeout = 60

        moConn.CommandTimeout = 90

        moConn.CursorLocation = adUseServer

        moConn.Provider = "SQLOLEDB.1"

        sConnect = "Data Source=" & sServer & "; Initial Catalog=" & sDatabase & ";"

        moConn.Open sConnect, sLogin, sPassword

        If moConn.State <> adStateClosed Then

            OpenConnection = True

        End If

    End Function

    '

    ' Release the Connection before your Module goes out of Scope

    ' Otherwise moConn is a possible memory leak

    If Not moConn Is Nothing Then

        If moConn.State = adStateOpen Then

            moConn.Close

        End If

        Set moConn = Nothing

    End if

    ' Usage:

    ' Parameters: sServer, sDatabase, sLogin, sPassword

    ' If your clients are having trouble resolving the sServer name

    ' use an IP address instead

    'If OpenConnection("SQL1", "pubs", "sa", "passme") Then

    '    Dim sSQL       As String

    '    Dim oRS        As ADODB.Recordset

    '    sSQL = "SELECT * FROM authors"

    '    Set oRS = New ADODB.Recordset

    '    oRS.CursorLocation = adUseClient

    '    oRS.CursorType = adOpenForwardOnly

    '    oRS.LockType = adLockReadOnly

    '    oRS.CacheSize = 1 ' Fire Hose Cursor

    '    oRS.Open sSQL, moConn

    ' -- Do something with the Recordset

    '    'Cleanup

    '    If oRS.State = adStateOpen Then

    '        oRS.Close

    '    End If

    '    Set oRS = Nothing

    'End if

    Andy

  • Hi,

    Hope you are using System Dsn.

    1.At the client system, select System Dsn and click on add button.

    2.Select driver as Sql server.

    3.Name the Dsn and select the server.

    4.if the server not coming in combo then add alias forthe server in the client network utility with TCP/IP .

    4.If you are using sql server authentication click on the client configuration and uncheck dynamically determine port.Enter 1433 there.In the server alias add IP Address.

    Hope this will work.

    By the by We are also developed a Shcool Management software which is running on more than 100 clients.If you are interested we can discuss.

    Regds

    Binu John

  • Don't know if you have solved this yet.  If no client machine can connect look for svrnetcn.exe on the server running SQL (usually under Program Files\Microsoft SQL Server\80\Tools\Binn).  Run it and make sure that TCP/IP is enabled.  A SQL install will usually also enable Named Pipes.  It's your choice whether to enable.

    HTH

    Don

  • Sounds obvios I know but you have checked that your network has not got any restrictions as to what traffic is transferred, or more specifically what is blocked.  For that matter you have ensured that the server and the client do not have local firewalls that could cause an issue if not configured correctly.

Viewing 6 posts - 1 through 5 (of 5 total)

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