|
-
Dec 30th, 2003, 09:14 AM
#1
Thread Starter
Member
ADO update error
I am getting a strange error when trying to update a field in my data table. Was happeining intermittingly, but now for every record:
Line 211: DataSetAttendance1.Attendance.Rows(0)("Description") = Trim(txt_description.Text)
Line 212: SqlDataAdapter2.Update(DataSetAttendance1)
Error:
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Any clues?
Thanks
-
Dec 30th, 2003, 09:26 AM
#2
Frenzied Member
Is the data type in the dataset a/o db a string value?
-
Dec 30th, 2003, 09:28 AM
#3
Frenzied Member
try
VB Code:
DataSetAttendance1.Attendance.Rows(0)("Description") = Trim(txt_description.Text).ToString()
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Dec 30th, 2003, 09:38 AM
#4
Thread Starter
Member
Tried that, no dice. Maybe a CType command?
This is so strange because it was working just fine, and has been no changes to that field in the table.
-
Dec 30th, 2003, 09:55 AM
#5
Thread Starter
Member
Got a clue
Okay the problem is a field that was changed from numeric to string. I deleted the dataset and created a new dataset from the adapter. The schema of the new dataset is good, but when I try to preview the data in the adapter I get an error saying the field is in bad format (still numeric) Do I have to create a new adaptor?
-
Dec 30th, 2003, 10:23 AM
#6
Thread Starter
Member
Got a clue
Okay the problem is a field that was changed from numeric to string. I deleted the dataset and created a new dataset from the adapter. The schema of the new dataset is good, but when I try to preview the data in the adapter I get an error saying the field is in bad format (still numeric) Do I have to create a new adaptor?
-
Dec 30th, 2003, 04:19 PM
#7
Frenzied Member
how are you creating the DataSet and DataAdapter? Are you just dragging and dropping them onto the form??? or are you creating them in code?
Yes, if the first one.
No, if the second.
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Dec 30th, 2003, 05:40 PM
#8
PowerPoster
Being educated does not make you intelligent.
Neither does being uneducated!!!
Taxes.
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|