Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set the mdw with Access
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00439574
Message ID:
00439598
Views:
15
Hi!

Instead of using

createobject('access.application')

use running of access application directly with command-line options (where you can specify MDW file, user and password), and than use GETOBJECT(, 'access.application')function to get COM reference to that application. Note that this way requires that no other Access application instances run at that time, otherwise GetObject() will return reference to the Access instance first opened.

Alternative solution - rework exporting model and use ODBC connection to access database, so you will be able to directly save data from VFP into Access database without automation. I can help you to make this using SQL Pass-Through without creating DSN in ODBC, if you stop on this solution.

>I have create a small class that exports a dbf directly into an MS-Access database that I create with an instance of Access within VFP.
>This all worked like a charm within my test enviroments.
>
>On a users machine, however, I have come accross the fact that he is using a system.mdw file. When creating the instance of Access the user is confronted with a user-dialog so he can enter his userid and password. If he fails to enter the correct one the system terminates.
>This is of course a very nice feature in Access. In my export, however, I do not want to be bothered with this.
>
>I have created a new security.mdw with nothing in. My question now is: how can a create an instance of Access in VFP while using this security.mdw?
>I'm using the createobject('access.application') to start the instance of Access.
>
>Regards,
>
>Ron Brahma
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform