Problems to connect to SQL Server2000


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Problems to connect to SQL Server2000

  1. #1
    Join Date
    Nov 2005
    Posts
    3

    Exclamation Problems to connect to SQL Server2000

    Hi guys.

    I need help. I have a Windows 2003 Server with a SQL Server 2000 installed.
    The server is in my office, and I have two option, or being the server into the domain, or not. I want that the database is accesible from the domain and out the domain (I mean, from anyplace with a ip belonging to the intranet).

    Curiously, when I'm in the office, with my laptop, logged in the domain, I have access to the sql server through my application in VB6. Now, I'm in my house connected through VPN to the intranet, and I can't access to the SQL Server through the application in VB6. If I make a ping to the server, I have answer, and even I'm connected to the server through Remote Connection, but If for example, I try to made a ODBC connection created from windows, but the server is not reachable.

    I've trayed to do this:

    Private Sub Create_connection()
    Const PathConnection As String = "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=MigratedGist;Data Source=3.249.181.147,1433;Network Library=dbmssocn"
    Set cnn = New ADODB.Connection
    cnn.CommandTimeout = 100
    Set rst = New ADODB.Recordset
    With cnn
    .ConnectionString = PathConnection
    .Open
    End With
    End Sub

    Before to do this, here, from my house, I executed this from the office, and I worked perfectly, but doesn't from my house...

    Private Sub Create_connection()
    Const PathConnection As String = "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=MigratedGist;Data Source=GISTSERVER"
    Set cnn = New ADODB.Connection
    cnn.CommandTimeout = 100
    Set rst = New ADODB.Recordset
    With cnn
    .ConnectionString = PathConnection
    .Open
    End With
    End Sub

    I mean, only the difference is to change the Data Source. Should I choose the IP Address, the SQL Server Name... I don't know...

    I don't know if I have to do something in the server to be reachable from anypleace with a ip from the intranet, or in my application.

    I will apreciate very much your help.

    Many thanks.

    Luis.
    Last edited by sitoramos; 11-28-2005 at 04:07 PM.

  2. #2
    Join Date
    May 2005
    Location
    UK
    Posts
    278
    I have a suggestion for you . Can you add the domain user name you use in the network to the sqlserver and try accessing the sql server using "Integrated Security = SSPI" from both the VPN situation and the office network itself I do this to work from home should work for you . I am not really able to give you the fix with your issue there can also be restrictions on your domain account on VPN or server access
    Sri

  3. #3
    Join Date
    Nov 2005
    Posts
    3
    Thanks!!
    But the best solution, would be, with the posibility to connect from any site, from the domain, from other domain or no domain. I know that this is strange... ;-)), but here we have several domains, or even people connected from out the domain. All posibilities, has the coincidence that the ip address is from the intranet (3.249.181.147 for example). All people have an ip belonging to 3.xxx.xxx.xxx range.

    For this reason, I don't know what is the best, to include or not include the server in the domain...

    I'm completely lost!!!

    Thanks!!!

    Sito

  4. #4
    Join Date
    Nov 2005
    Posts
    3
    I'm traying to do execute this in the connection string:
    "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Initial Catalog=MigratedGist;Data Source=3.249.181.147"

    IT WORKS PERFECTLY!!! So, in theory, that is working perfectly!!!!!

    Great!!!!

    Many thanks!!!!

Similar Threads

  1. Connect to SQL Server or Oracle vs Access
    By James in forum VB Classic
    Replies: 3
    Last Post: 03-12-2002, 09:43 AM
  2. Problems with IN clause in SQL 2000
    By mario in forum Database
    Replies: 0
    Last Post: 11-17-2001, 06:25 PM
  3. Problems with SQL 2000 Server SP1 on MSCS
    By Reginaldo in forum Database
    Replies: 0
    Last Post: 08-30-2001, 04:24 PM
  4. Replies: 1
    Last Post: 05-14-2001, 01:24 PM
  5. Problems with MS SQL 6.5 for ERIC 2000
    By Eugene in forum Enterprise
    Replies: 1
    Last Post: 06-19-2000, 03:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center