Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE Error
Message
From
07/02/2006 16:26:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
OLE Error
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01094445
Message ID:
01094445
Views:
61
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
Map
View

Click here to load this message in the networking platform