By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,616 Members | 2,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,616 IT Pros & Developers. It's quick & easy.

database problem with vb.net

P: n/a
QT
Dear Sirs,

I could not understand vb.net database connection statements for access.mdb.

I was using following procedures with vb 6 without problem. But I can not
find same solution for vb.net For example I can not get any data with;
adoPrimaryRS!Gurup.

I try to find somehing on msnds, but no result. What should I do? where can
I find solutions

Best Regards

Dim adoPrimaryRS As Object
Dim db As ADODB.Connection

db = New ADODB.Connection

db.CursorLocation = ADODB.CursorLocationEnum.adUseClient

db.Open("PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & VB6.GetPath &
"\ber.mdb;")
adoPrimaryRS = New ADODB.Recordset

adoPrimaryRS.Open("select DISTINCT Gurup from Rehber Order by Gurup", db,
ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic)
Do While Not adoPrimaryRS.EOF

If Not IsDBNull(adoPrimaryRS!Gurup) Then

cmbGurup.Items.Add(adoPrimaryRS!Gurup)

End If

adoPrimaryRS.MoveNext()

Loop

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.