General information
Title:
DLL in Foxpro - Tables in App, UI functions
Hi!
I am trying to write a DLL in Foxpro.
This is what I've done for one part.
DEFINE class dblib AS CUSTOM OLEPUBLIC
PROCEDURE test
LPARAMETERS lnConnectionHandle,dest
temp="mainkey='Womens Wear*23809-1'"
LSQL='PDMSELECTWO measure,"'+ temp +'"'
nerror=SQLEXEC(lnConnectionHandle,LSQL,dest)
select &dest
IF nerror!=1
AERROR(aErrorArray)
lcerrorstring="SQL Server Error : "+STR(aErrorArray(1,1))
lcerrorstring=lcerrorstring+aErrorArray(1,2)+CHR(13)
lcerrorstring=lcerrorstring+aErrorArray(1,3)+CHR(13)
RETURN lcerrorstring
ENDIF
RETURN
ENDDEFINE
I also tried commeands like select &dest table
and INDEX ON field tag field
which don't fail in the dll.
But I want to have the table available to me after.
SO I do a
otest=CREATEOBJECT("dblink.dblib")
handle=otest.connect() &&One of my other functions
But When I do:
resultotest.test(handle,'worktable') &&One of my other functions
I cannot select the work table.
The questions:
1) Can I not select a table in a DLL and have it available to my
Application
2) I can't do things like SQLCONNECT(), BROWSE, MESSAGEBOX
Why not! Is there a way to do this???
Thanks a Mill
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