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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Control won't update unless it is numeric

Status
Not open for further replies.

Smarty

Programmer
Apr 12, 2001
191
BE
I have a database in my VB with an ADO Control. When i want to update several fields (or insert a new), i'm only able to update numeric fields (no textfields, no date fields). When i run it, i get a nonsense error message...

Any idea of what is wrong here?

Thanx a lot

Maarten
 
That sounds weird, but what exactly do you mean by "i'm only able to update numeric fields" can't you even write into the fields or you get an error when doing it?
Also wich controls are you using bound to the ADO Control? Text boxes, combo boxes, datagrid?
If it's a textbox for example it might be a problem on the DataFormat property of that text box, but only with that info it's hard to tell.
Plz be more specific otherwise it's difficult to help you out.
 
Well, I think the problem isn't the VB but the access-database that I use.
When I execute the following VBcode, I get a runtime-error that doesn't make sense:
adoAandeel.recordset![datefield]= DateInTextbox

But when I execute the following line, everything is alright:
adoAandeel.recordset![numericfield]= NumberInTextbox

So I can update numeric fields in my accessdatabase, but not date or textfields.

I hope this makes things more clear.
Thanks
 
What is the error message?
What datatype is ![datefield]?
 
you probably have some datatypes that doesn't match.
Check wich are the datatypes for all the fields on your table then check the dataformat for each of your textboxes. They should match otherwise you'll probably get an error.

Check this out and correct any that's not macthing, if u still have the problem show us what exactly is the error message you are getting.
 
The datatypes are correct, I've checked them.
The errormessage is:

Run-time error '-2147217887 (80040e21)'

Isn't that a nonsensmessage?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top