Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Try it from the VFP command window to make sure it has registered correctly. Just to clarify, the CreateObject() call takes the exe name and then the class name so if your project compiled to myprojectname.exe and your OlePublic class is myServer then the code in your post should work. To make it work in the client's you have to register the exe with myprojectname /regserver and install the VFP runtimes.
>I'd like to try the COM Server. I created a prg with the class described below in it. I created a new project and added that file. I compiled as an EXE/COM Object. (so far so good). I created a simple form in Access and created a command button and in the click method I added the code:
>
>
>
>
>Set oSrv = CreateObject("myProjectname.myServer")
>bFlag = oSrv.SaveData(var1, var2, var3)
>Set oSrv = Nothing
>
>where var1, etc are field names from the form's table. When I press the command button during runtime I get and error - "Invalid Outside Procedure".
>
>Since I'm not an Access programmer, I must be missing something. Any ideas?
>
>
>Sandi
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement