How can i debug this?

jswota

Well-known member
Joined
Feb 23, 2009
Messages
49
Programming Experience
Beginner
Hi.

I have a VB.Net app that imports data from one database into another. Some data alterations a re performed during the import. What i am doig is this:

1. Fill a table with data from source using tableadapter_source.fillby method

2. Iterate through each row in the source table, make some changes and then insert the row into the destination table using table_destination.rows.add method.

3. Save changes to destination table using tableadapter_destination.update method.

When i perform the update i receive the following error:

conversion failed when converting the varchar value '0.0165000' to data type int.

I am trying to find the source of this error. The value '0.0165000' is never even loaded into the source table and when i look at the destination table prior to updating the value isn't in there either.

Is there any way that i can see the actual row that is failing during the update as opposed to a general error statement about the entire update process.

Thanks for the help.
 
Never mind. Another user created a trigger that i was unaware of. The error was in this trigger.

I would be interested to know if there is a way to get a bit more info out of this error though.

Thanks.
 
I was going to say, it doesnt look like .net; it looks more like a DB error message.

Also given the number involved, it could have been a date (which would be quite misleading!) which converted to a char (because of the query) and then was stored in an int( because of the trigger)
 
Is there any reason you suspected it was an SQL error message or is it just experience? It would be nice to know how to differentiate between SQL and VB errors.

Thanks.
 
Back
Top