Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DLL in Foxpro - Tables in App, UI functions
Message
 
 
À
11/11/1998 05:43:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00156508
Message ID:
00156673
Vues:
27
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform