
Help me: Update SQL Server table through sqlDataAdapter...
I have a seemingly simple question, but I am completely stuck:
I have a page with a sqlDataAdapter and a dataset.
After filling the dataset in line 2, I can read from the dataset without
problems.
After altering a value in line3, I can read the NEW value from the dataset
without problems.
But..when updating to disk in line 4, I get this:
"System.FormatException: Input string was not in a correct format."
The error is in line 4.
1: Sub iWouldLikeToSaveSomeData ()
2: adapArticles.Fill(DsArticles1)
3: DsArticles1.Tables("Articles").Rows(2).Item("Article") = "myNewText"
4: adapArticles.Update(DsArticles1)
5: End Sub
The field in the Database is a Varchar, and has plenty of room for
"myNewText".
Any ideas as to what to look for. I am completely stumped, as I have another
identical page
that works just fine.. :-(
Thanks,
J.Jespersen