Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.NET opening MSAccess 1

Status
Not open for further replies.

benlinkknilneb

Programmer
May 16, 2002
590
0
0
US
Can someone please give a simple example of how to open a "recordset" from Access2000 with VB.net? I've been through hundreds of posts on here, and through page after page of the Books Online... I understand that something has changed from VB6, but nowhere do I find a good explanation for what to do now.

All I want is this:

I have an Access2000 mdb with several tables, which my VB6 app was querying and returning results from.

I'd like to know how to:

a) open a table (and/or the results of a query) so that i can manually read each record (in vb6 i'd use the .movenext)

b) open "querydef" objects (are they still called that?) and change the SQL statements inside them

Anybody that can shed some light on this for me, thanks in advance!

Ben
 
Check out this thread here for some basics.
thread796-389653

If you want to loop through manually you can do a for each row in dataset.table, type loop. You would need to declare row as a datarow first of whatever dataset your using. Or a generic datarow if you aren't using a typed dataset.

The other option is the forward readonly cursor. Also known as a datareader.

Just use
while datareader.read

end while


Not sure about your second question. If you need more specifics please ask and I will do what I can. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Thanks, amigo... that's plenty to chew on!

The company I work for just bought vs.net, and I'm still waiting for the literature they ordered to come in... I appreciate it!
 
no problem man thanks for the star!

Like I said if you need more help don't hesitate to post. There are many brilliant people in these forums.
That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
On your question about querydefs (which is really DAO), I don't think ADO.NET handles them, i.e. this isn't an ADO.NET equivalent to ADOX, the extension to ADO that handles this sort of thing Cheers,
Steve C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top