Results 1 to 2 of 2

Thread: connect code for sql server 2005 express edition in vb6

  1. #1
    Member
    Join Date
    Aug 12
    Posts
    44

    connect code for sql server 2005 express edition in vb6

    Hai, every body

    I am working with a project SRLGNT in visual basic 6 with access database as back end. it is working fair.

    the connection code to connect base is below
    Code:
    Public db As New ADODB.Connection
    Public rs As New ADODB.Recordset
    Public path As String
    
    
    Public Sub connectDB()
    path = App.path & "\SRL.mdb" 'is what my database name
    db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data source = " & path
    End Sub
    But now I wish to change to sql databae for some reasons. I installed the sql server 2005 express edition in my computer. and I have a database name: "GRANTH3"
    the path to data base is :"SAI-A4D75EF4364\SQLEXPRESS\Databases\GRANTH3"

    kindly help me to modify the above connection string code to connect to sql server 2005 with above mentioned database.

    Thanks in advance.

  2. #2
    Web developer Nightwalker83's Avatar
    Join Date
    Dec 01
    Location
    Adelaide, Australia
    Posts
    9,841

    Re: connect code for sql server 2005 express edition in vb6

    Have a look in the Database Development FAQ or the SQL Server 2005 useful info [includes links to download it] thread in the Database Development section.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    Please consider giving me some rep points if I help you a lot.
    DON'T BUMP YOUR POSTS!!! Links to my code examples can now be found on my website: My websites
    Please rate my post if you find it helpful!
    Technology is a dangerous thing in the hands of an idiot! I am that idiot.

Posting Permissions

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