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.
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.