SQL
I need to connect SQL Server with the front-end VB 6.0.
Plz. help me And Send the Coding of connectivity SQL SERVER with VB 6.0.
Networks
I need to connect SQL Server with the front-end VB 6.0.
Plz. help me And Send the Coding of connectivity SQL SERVER with VB 6.0.
by samresh_dutta_2006 Accepted solution
by scott_heath Accepted solution
by maniacman Accepted solution
by ignacem Accepted solution
'VB Code for Connectting sql Database
Dim ObjCnn As ADODB.Connection
Dim StrCnn as String
Private Sub Form_Load()
StrCnn = "Provider=SQLOLEDB.1;Password=kullu;Persist Security Info=True;User ID=kullu;Initial Catalog=InventoryKullu;Data Source=accounts"
'See note
Set ObjCnn = New ADODB.Connection
With ObjCnn
.ConnectionString = StrCnn
.ConnectionString = StrInsertAccess
.Open
.CursorLocation = adUseClient
End With
end sub()
'END OF CODE
note - if password/user id does not exists set "Security Info=false"
Initial Catalog is database name in the sql server database
data source is sql server name
you may create record set object and use sql quarry to retrieve record(s)
This discussion is closed to new replies.
Sort by Trending