Adapter.UpdateCommand.ExecuteNonQuery() ???

D

Darryn Ross

Hi,

I am having a problem updating a database table in an application of mine.
The application is thrown when i fire the following command...
Adapter.UpdateCommand.ExecuteNonQuery() ;

The exception that is being thrown is the following...

message -> "Data type mismatch in criteria expression"

source ->"Microsoft JET Database engine"

TargetSite-> "Void ExecuteCommandTextErrorHandling(Int32)"

i have no idea why this isn't working, the database field is a text field
and not required and no validating rules accompany it??



Regards

Darryn
 
K

Kevin Aubuchon

It sounds like the datatypes of your arugments are mismatched with their
destination columns. Check your argument values again, and explicity cast
them if necessary.

kevin aubuchon
 
D

Darryn Ross

i have double and triple checked my update command and database fields and i
can't find a problem...

UpdateDtlsCommand.Parameters.Add("@Param1", OleDbType.VarChar, 50, "Name") ;
UpdateDtlsCommand.Parameters["@Param1"].Value = txtname.text ;

Database field is a "text" field... ??? any more ideas, this is such an easy
thing, i can understand what the problem is?

Regards

Darryn
 
S

Scrubbing Bubbles

Darryn said:
i have double and triple checked my update command and database fields and
i can't find a problem...

UpdateDtlsCommand.Parameters.Add("@Param1", OleDbType.VarChar, 50, "Name")
; UpdateDtlsCommand.Parameters["@Param1"].Value = txtname.text ;

Database field is a "text" field... ??? any more ideas, this is such an
easy thing, i can understand what the problem is?

You might want to look at the chart at the bottom of this page:

http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=454

It's for sql and c#, but it might help.

As you can see, implicit datatype conversions are not obvious.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top