Hi,
I'm having a hard time trying to use the events tab in ASPRunner
I'm using the newest version of ASP Runner and connecting to SQL database.
4 tables:
Customers
OrderHeader
OrderDetail
AttentionReasons
Heres the query to connect them all:
SELECT opCustomer.CustName, opOrdDtl.PO, opOrdDtl.Model, opOrdHdr.ENTER_DATE, sordAttentionReasons.Attention, opOrdDtl.SO,
opOrdDtl.ID
FROM opCustomer RIGHT OUTER JOIN
opOrdHdr ON opCustomer.CustId = opOrdHdr.CustID RIGHT OUTER JOIN
opOrdDtl LEFT OUTER JOIN
sordAttentionReasons ON opOrdDtl.ID = sordAttentionReasons.OrdDtlID ON opOrdHdr.SO = opOrdDtl.SO
This runs just fine and brings me back the expected result set. The user then uses the advanced search feature and can find the specific record they wish to edit & hit edit to bring them to the edit screen. Once the user edits the record & hits save I get all kinds of errors.
I put this code in OrderDetail After Edit: (Is this where it should go or should it be sordAttentionReasons AfterEdit?????
How do I have it pick up the values (Attention & ID) for the fields (Attention & OrdDtlID) I want to insert in sordAttentionReasons table?????
Sub AfterEdit()
'** Insert a record into another table ****
strSQLInsert = "insert into sordAttentionReasons (Attention, OrdDtlID) values (Attention, ID)"
dbConnection.Execute strSQLInsert
End Sub
This is the error I'm receiving:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E23)
[Microsoft][ODBC SQL Server Driver]Cursor operation conflict
/Comments3/opOrdDtl_edit.asp, line 150
I did NOT create parent / child relationship in ASP Runner between these tables - should I do that? The relationships are already set in the database structure.
Can anyone pleae help me with this? I've already spent way too much time trying to get something this simple to work.
I've looked all over for some samples of how to use the events tab in ASP Runner and can not find any samples. Everythng I find seems to be just single lines of code with no explanination of where to put it.
Thanks,
Corinne