Computing.Net > Forums > Programming > VB & ADO's

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

VB & ADO's

Reply to Message Icon

Name: Rick
Date: January 11, 2002 at 14:58:58 Pacific
Comment:

Hello,
I am fairly new to VB, and I'm working with ADO's. I have a few problems that I can't figure out....
1.> I'm using a Access database and three tables. I use 1 ADO to retrieve all of the data from all 3 tables to fill textboxes. When I do a debug.print adomain.RecordCount right after getting the data but before fill the textboxes, the count is ALWAYS -1. But the data fills the textboxes and I can scroll through just fine.

2.> If I make changes to the data in a textbox, do I need to use an SQL statement to update the DB or can I use the ADO's update method? I've looked at alot of examples and they are using a statement like adomain!fields "textbox1" = txtTextbox1 & then an adomain.update. I've tried to use this method, but always error out.

3.> And last after scrolling through the data using the .MovePrevious method, always returns an error even though the .MoveNext method works just fine. I do have an 'if BOF' statement to check to see that it is not at the beginning of the file.

I believe all of these errors are related to the fact that the RecordCount is always -1, but I can't figure out what I am doing wrong.
I greatly appreciate any suggestions that anybody might have. Thanks,
-Rick



Sponsored Link
Ads by Google

Response Number 1
Name: Fred
Date: January 12, 2002 at 23:30:16 Pacific
Reply:

Try using this syntax:
Recordset.Update [Fields], [Values]


0

Response Number 2
Name: subiesh
Date: March 2, 2002 at 05:15:01 Pacific
Reply:

it's very helpfull & easy contents.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


make folder with C visual basic



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB & ADO's

delete a record in vb www.computing.net/answers/programming/delete-a-record-in-vb/4129.html

website for VB.NET? www.computing.net/answers/programming/website-for-vbnet/12306.html

Email in VB using MS Outlook www.computing.net/answers/programming/email-in-vb-using-ms-outlook/9644.html