hi all,
actually i want to connect my sql server database with visual basic application through coding.any body .
anybody can suggest me the step by step process of database connectivity with sql server.
give me proper answer.
regards,
abhishek
Printable View
hi all,
actually i want to connect my sql server database with visual basic application through coding.any body .
anybody can suggest me the step by step process of database connectivity with sql server.
give me proper answer.
regards,
abhishek
In vb.net theres a class called SqlConnection that opens a connection to sql server.
Hi Abhi
Use this code to connect to SQL Server in VB.6.0
:thumb: This will Help u out... :wave:Code:'General Declaration
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Form_Load()
con.Open "Provider=SQLOLEDB.1;Password=sa;Persist Security Info=True;User ID=sa;Data Source=ASHOK"
rs.CursorLocation = adUseClient
rs.Open "select * from Employee", con, adOpenDynamic, adLockReadOnly
Set DataGrid1.DataSource = rs
End Sub
If you are using .Net there is a great tutorial in my signature...