Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DLL in Foxpro - Tables in App, UI functions
Message
 
 
To
11/11/1998 05:43:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00156508
Message ID:
00156673
Views:
31
Tim,

If you want ANY UI at all you have to compile it as an EXE instead of a DLL. You also have to remember that the COM sever will be starting up in a completely default VFP environment and folder. You must explicitly have the server Init() do things like SET and CD \AppFolder

>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
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform