Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting userid and password to Connection items
Message
From
21/09/1998 07:58:25
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00137732
Message ID:
00138966
Views:
14
Hi Renato,

i had the same pb and found a definitive solution. I have a c/s app that fully generates the dbc at run time (from a central repository accessed by sql pass thru) and the problem was even more acute for us.

It looked there were no solution for more a week ... and then eureka! It is a bit tricky but quite stable.

1) create the connection with adequate datasource, a blank user name and a blank password.

2) open your different remote SQL view using this connnection in SHARED mode

3) When opening the FIRST view, VFP willl prompt the ODBC base dialog where the user will be able to put name and password

4) Your other views will then open using the initial view

The only real draw-back is that you get no control on the success (or failure) of the odbc connection. You need to put some specific code in the ERROR method of your running to trap bad password, user name or connect pb.

Apart from the above issue (when the user or password is wrong), this solution suited me fine. No password or user name in the DBC (mine are temp ones but i want maximum security).

Good luck

François
Previous
Reply
Map
View

Click here to load this message in the networking platform