Help me: Update SQL Server table through sqlDataAdapter... 
Author Message
 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



Sun, 26 Sep 2004 17:54:40 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Loading tables from a database via SQLDataAdapter and SQLDataAdapter.Fill

2. Updating A SQL server table through DAO and ODBC In Access 2000

3. Updating attached SQL Server Tables

4. Acc2000: Access tables attached to SQL-Server won't update

5. Simple update to a row in a table in a SQL Server database

6. SQL Server table update

7. Simple update to a row in a table in an SQL Server database

8. sql server table displaying and updating from a datagrid

9. Update SQL Server table

10. Opening a SQL Server Table from a VB form for update

11. ADO, SQL Server Updating Recordset using 2 Tables

12. Dataset changes updates grid , How to update SQL table

 

 
Powered by phpBB® Forum Software