Environment versions
Network:
Windows 2000 Server
The following code works great the first time but gives me an OLE error code if I try and run it a second time without closeing app first.
lParam p1
Create Cursor EDCNPrinting(dmdrno c(12), dmpendrev c(10), dmrelrev c(10), dmtitle c(32), dmsize c(3),;
dmsheets n(5), descofchng g)
printEDCNString = "Select * From drawmstrp Join drawmext3 On drawmstrp.dm_drawing_number = drawmext3.dmdrawno Where drawmstrp.dm_drawing_number = '" + p1 + "'"
If SQLEXEC(pdmVar.as400con1, printEDCNString, 'printEDCNQuery') <> -1 Then
If reccount('printEDCNQuery') > 0 Then
Insert Into EDCNPrinting(dmdrno, dmpendrev, dmrelrev, dmtitle, dmsize,;
dmsheets) Values(printEDCNQuery.dm_drawing_number, printEDCNQuery.dm_pending_change,;
printEDCNQuery.dm_released_change, printEDCNQuery.dm_drawing_title, printEDCNQuery.dm_size,;
printEDCNQuery.dm_sheets)
Select EDCNPrinting
Go Top
Append General EDCNPrinting.descofchng From Eval(printEDCNQuery.page1path)
*Browse
Return .T.
Else
Return .F.
EndIf
Else
If Aerror(pdmVar.odbcerrormsg) > 0 Then
MessageBox(pdmVar.odbcerrormsg(2))
EndIf
Return .F.
EndIf
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only