Forum Moderators: open

Message Too Old, No Replies

Editing Access table using a Data Grid

OleDbException

         

geokes

12:53 pm on Apr 12, 2003 (gmt 0)

10+ Year Member



Hi,
can anyone explain the mening of the following:

System.InvalidOperationException ---> System.Data.OleDb.OleDbException: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
--- End of inner exception stack trace ---
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at DreamweaverCtrls.DataSet.OnDataGridUpdate(Object Src, DataGridCommandEventArgs E)

I'm using the following query to display info from three tables:

SELECT Customers.UserName, tblVotes.Rating, tblVotes.Comments, tblImages.ImageURL, tblVotes.VoteID, Customers.CustomerID
FROM Customers INNER JOIN (tblImages INNER JOIN tblVotes ON tblImages.ImageID = tblVotes.ImageID) ON Customers.CustomerID = tblVotes.CustomerID
WHERE (((tblImages.ImageType)="Logo"));

In Access I can Update the Rating and Comment fields.
On the webpage I use a datagrid with an Edit column.
Here is the command part of it:

CommandText='<%# "SELECT * FROM qryVotes WHERE UserName =?" %>'
Debug="true">
<Parameters>
<Parameter Name="@UserName" Value='<%# User.Identity.Name %>' Type="WChar" />
</Parameters>
<EditOps><EditOpsTable Name="qryVotes" />
<Parameter Name="Rating" Type="UnsignedTinyInt" />
<Parameter Name="Comments" Type="LongVarWChar" />
<Parameter Name="VoteID" Type="Integer" IsPrimary="true" />
</EditOps>

What drives me crazy is that the error message on the top doesn't always come up!

Please help!

korkus2000

2:22 pm on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it happening when you click the update button? What is in you update event?

geokes

4:19 pm on Apr 12, 2003 (gmt 0)

10+ Year Member



Yes, it's happening when I click yhe update button. So far it never happend while updating the "Comments" text field only while updating "Rating" which is numeric.
The data grid was generated in Macromedia Dreanweaver MX and has the following line:
OnUpdateCommand="dsVotes.OnDataGridUpdate"
The actual cod to handle it is in DreamweaverCtrls.dll.
May be I should ask them about it? Or hand code the whole thing?

korkus2000

5:02 pm on Apr 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you set debug="true" at the top of the page?

geokes

7:07 pm on Apr 12, 2003 (gmt 0)

10+ Year Member



It is set inside the <MM:DataSet tag. (MM stands for Macromedia.)

korkus2000

2:13 pm on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't really know dreamweaver that well as far as .Net. You may want to look at some of the support topics at macromedia about it.

geokes

11:38 am on Apr 14, 2003 (gmt 0)

10+ Year Member



The problem was ocuring if a text fild was left blank.
As I read somethere .net was trying to insert a null value to a text field.
Was there any way to tell this just by looking at the error message?
Now I'm implementing field validation in the datagrid edit mode.
Any good examples around?