Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error trying to save changed web data
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00893053
Message ID:
00893391
Views:
14
Hector,
Thank you for helping me.
I am now able to see what the exception is.
I've made several adjustments to my program, but it's still not working.
I followed the example in the help system, but I keep getting the message,
"Update unable to find TableMapping['Table'] or DataTable 'Table'."

Do you have any idea why this is?

Rick

'----example from the help system --- "Updating the Database with a DataAdapter and the DataSet" ------
'Dim catDA As OleDbDataAdapter = New OleDbDataAdapter("SELECT CategoryID, CategoryName FROM Categories", nwindConn)
'catDA.UpdateCommand = New OleDbCommand("UPDATE Categories SET CategoryName = ? " & _
' "WHERE CategoryID = ?", nwindConn)
'catDA.UpdateCommand.Parameters.Add("@CategoryName", OleDbType.VarChar, 15, "CategoryName")
'
'Dim workParm As OleDbParameter = catDA.UpdateCommand.Parameters.Add("@CategoryID", OleDbType.Integer)
'workParm.SourceColumn = "CategoryID"
'workParm.SourceVersion = DataRowVersion.Original
'
'Dim catDS As DataSet = New DataSet
'catDA.Fill(catDS, "Categories")
'
'Dim cRow As DataRow = catDS.Tables("Categories").Rows(0)
'cRow("CategoryName") = "New Category"
'
'catDA.Update(catDS)
'---------------------------------------------------------

>>How do I find out what the exception is?
>
>Try using a TRY/CATCH block:
>
>
>
>try
>	oledbDA.UpdateCommand.CommandText =
>"UPDATE Contacts SET Company= MyCompany WHERE Unique_ID = MyContacts_Unique_ID"
>catch ex as exception
>	' The value of ex.message will tell you the error
>	Response.Write(ex.message)
>end try
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform