|
-
Feb 27th, 2007, 04:59 AM
#1
Thread Starter
New Member
database connectivity
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
-
Feb 27th, 2007, 06:15 AM
#2
Re: database connectivity
In vb.net theres a class called SqlConnection that opens a connection to sql server.
"The dark side clouds everything. Impossible to see the future is."
-
Feb 27th, 2007, 06:31 AM
#3
Lively Member
Re: database connectivity
Hi Abhi
Use this code to connect to SQL Server in VB.6.0
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
This will Help u out...
-
Feb 27th, 2007, 06:36 AM
#4
Hyperactive Member
Re: database connectivity
If you are using .Net there is a great tutorial in my signature...
Microsoft Office Integration:Useful Database Links:
Connection Strings
Im a pogramar
Iam a programer
I’m a programor
I write code! 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|