Need suggestion for two database inconsistency
-
I have a problem of inserting a record which includes data type conversion. There are two databases with the same data structure. One database is ok to insert that record, but another is not ok for data type conversion. I've checked all the data fields.Please give me any suggestion to solve it.
-
I have a problem of inserting a record which includes data type conversion. There are two databases with the same data structure. One database is ok to insert that record, but another is not ok for data type conversion. I've checked all the data fields.Please give me any suggestion to solve it.
What type is it you're trying to insert, and what type is the field? What DB are you using?
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
What type is it you're trying to insert, and what type is the field? What DB are you using?
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
I'm using MSSQL2005. Inserting includes code such as 'X001' which is varchar and it needs to be incremented automatically. So that I converted varchar to numeric. It's ok for one database, but it's not ok for another one. I've checked all the data fields. It's all the same. Any solution for this? Thanks a lot.
-
I'm using MSSQL2005. Inserting includes code such as 'X001' which is varchar and it needs to be incremented automatically. So that I converted varchar to numeric. It's ok for one database, but it's not ok for another one. I've checked all the data fields. It's all the same. Any solution for this? Thanks a lot.
Are both databases having the same globalization settings?
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
Are both databases having the same globalization settings?
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
I have a problem of inserting a record which includes data type conversion. There are two databases with the same data structure. One database is ok to insert that record, but another is not ok for data type conversion. I've checked all the data fields.Please give me any suggestion to solve it.
vanillaET wrote:
There are two databases with the same data structure. One database is ok to insert that record, but another is not ok for data type conversion. I've checked all the data fields.Please give me any suggestion to solve it.
Check the data-fields again. You're inserting something that cannot be converted, might be a text in a bit or a datetime field. Try logging all values that are going to be inserted, and have the app mail the offending values using a try-catch block. Next, simply try the offending values using your original insert-statement trough the Sql Management Studio.
Bastard Programmer from Hell :suss: