Results 1 to 10 of 10

Thread: Remote Connection VB6/SQL Server 2000

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Remote Connection VB6/SQL Server 2000

    I have this connection string that works for locallan connection:
    [Highlight=VB]
    ConnectionString = "Provider=MSDASQL.1;Password=" & sPWD _
    & ";User ID=" & sUserName & _
    ";Extended Properties=""Description=strData;DRIVER=SQL Server;SERVER=" _
    & "myServer" & _
    ";UID=strUSER;PWD=strPASS;DATABASE=myDB"""
    VBCODE]

    but i want to modify it to connect remotely (internet) to my DB....

    do I only have modify "myServer" to "IP:Port//ServerName" ?

  2. #2

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Re: Remote Connection VB6/SQL Server 2000

    Quote Originally Posted by RhinoBull
    You will need to provide valid URL to your server:

    Provider=sqloledb;Data Source=YOUR.SQLSERVER.COM;Initial Catalog=pubs;User Id=myUsername;Password=myPassword;"
    "xxx.xxx.xxx.xxx:xxx//servername" is a URL right?

  4. #4

  5. #5

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Re: Remote Connection VB6/SQL Server 2000

    no it doesnt work

    Enterprise Manager can connect to it remotely but not my vb application

    i found something about remote connection with sql2000 but this is different than my other connection string...is it what i want to do?:


    MS Remote - SQL Server
    If you want to use an ODBC DSN on the remote machine

    oConn.Open "Provider=MS Remote;" & _
    "Remote Server=http://myServerName;" & _
    "Remote Provider=MSDASQL;" & _
    "DSN=myDatabaseName;" & _
    "Uid=myUsername;" & _
    "Pwd=myPassword"

    i tried it anyway and it doesnt work neither..please help

  6. #6

  7. #7

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    40

    Re: Remote Connection VB6/SQL Server 2000

    Quote Originally Posted by RhinoBull
    Did you see connection string that posted for you? If so then you wouldn't find any DSN in it... Also, is your IIS configured?
    yeah i tried it...no luck

    what is IIS?

  8. #8

  9. #9
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Remote Connection VB6/SQL Server 2000

    In case you can't find it you may also try using IP address:
    Code:
    strConnect = "Provider=sqloledb;Network Library=DBMSSOCN;"
            "Data Source=130.120.110.001,1433;"
            "Initial Catalog=MyDatabaseName;User ID=MyUsername;"
            "Password=MyPassword;"

  10. #10
    New Member
    Join Date
    Nov 2006
    Posts
    1

    Re: Remote Connection VB6/SQL Server 2000

    qoute: strConnect = "Provider=sqloledb;Network Library=DBMSSOCN;"
    "Data Source=130.120.110.001,1433;"
    "Initial Catalog=MyDatabaseName;User ID=MyUsername;"
    "Password=MyPassword;"

    end quote

    if the solution doesn't work, try:

    1. activate tcp/ip (see property for the tcp/ip port) protocol on the msde/sqlserver

    run c:\Program Files\Microsoft SQL Server\80\Tools\binn\svrnetcn.exe

    I hoped it helped you,

    Greetings,
    Gielen Rob

Posting Permissions

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



Click Here to Expand Forum to Full Width