dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Problem Connect Vb6 to Sql Server 2000(in other pc)

  1. #1
    Join Date
    Apr 2007
    Posts
    1

    Problem Connect Vb6 to Sql Server 2000(in other pc)

    i using this coding try to connect to SQL Server that in other computer.
    but it cant login into the computer.
    The security for SQL Server set to Window


    dim con as adodb.connection
    dim rs as adodb.recordset

    set con = new adodb.connection
    set rs = new adodb.recordset

    con.connectionstring = "Driver={sqlserver}; server=192.168.1.9; database=Project"
    con.connectiontimeout = 30
    con.open



    The error i got is
    "Login failed for user 'ABC\Guest'"

  2. #2
    Join Date
    Mar 2005
    Location
    Los Angeles, Calif. AKA: Gangsta Yoda™
    Posts
    455
    Looks like you may be already getting the prompt to enter in the credientials but you need to explicitly set it to prompt when using the connectionstring like that.

    con.Properties("Prompt") = adPromptAlways

    Do you also have sql permissions to logon with those network user logon credentials?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer code questions via PMs.
    Microsoft MVP 2006-2009
    Office Development FAQ (VBA, VB6, VB.NET, C#)
    Software Engineer MCP (VB6 & .NET)
    Reps & Rating PostsVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6Outlook Global Address List

  3. #3
    Join Date
    Aug 2005
    Location
    Hermosillo, Sonora, Mexico
    Posts
    103
    Try the next :

    Code:
        
    con.connectionstring  = "Provider=SQLOLEDB.1;" & _
                                     "Integrated Security=SSPI;" & _
                                     "Initial Catalog=Project;" & _
                                     "Data Source=192.168.1.9"

Similar Threads

  1. SQL Mail Problem
    By alex in forum Database
    Replies: 3
    Last Post: 11-03-2005, 06:27 AM
  2. Security Manager problem in SQL server 6.5
    By Helen in forum Database
    Replies: 3
    Last Post: 08-09-2002, 11:21 AM
  3. Access to SQL server
    By Nate in forum Database
    Replies: 29
    Last Post: 05-09-2001, 10:04 AM
  4. SQL server problem or DB problem
    By Tiffany in forum Database
    Replies: 6
    Last Post: 01-10-2001, 12:03 AM
  5. Major Problem with RDO 2.0, ODBC 3.5, SQL Server7
    By Andreas Roth in forum VB Classic
    Replies: 0
    Last Post: 04-10-2000, 09:43 AM

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