Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shared connection
Message
From
15/11/2001 05:20:10
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00581901
Message ID:
00581949
Views:
20
Hi Vlad,

Thanks a lot. I understand now. Actually, I'm concerning the security issue.
Currently, I include the DBC in the .exe and encrypted it. (I believe it is safe) The drawback is that I couldn't use DBSETPROP().

Recreating the DBC in run-time is a good idea. But if the user kill the application then the temporary DBC will be left in the user's PC.
Any other workaround solutions except VFP7 ? My company seems not willing to upgrade it.

Thank you.
Wilfred

>
Hi!
>
>You can share only connection that is in the DBC. THis means that when remote view is opened, it will use the connection from the database to connect. Any connection handlers created by connecting using SQL Pass-Through commands will not be used by views. You can do opposite though: open the remote view (that will connect using connection from database), then use CursorGetProp("ConnectHandle") for that view. In such case and in only such case connection will be chared, but that connection is created ONLY by the DBC connection object.
>
>This is a well-known security problem, and usually workaround is to re-create the database loaclly at the client computer temporary directory by creating connection and all views programmatically.
>
>In VFP7 there is a new feature for "USE" command - for remote view you can specify explicitly the connection string. So in VFP 7 you can do such thing, but it will not be a shared connection (correct me if I'm wrong here), and it will look somewhat differently:
>
>1. In the VFP setting, checked the "Share connection" and saved as default.
>2. Create a database, create a valid connection with "connection string".
>3. Add a view using that connection and set it as "shared connection".
>4. Modify that connection and put dumpy "aaaa" in the PWD and UID.
>5. Open the view: USE MyDBC!TEST1 CONNSTRING 'DSN=testdb;UID=dba_test;PWD=test;SERVER=testdb;'
>
>HTH.
>
>>Hi,
>>
>>I've read a lot of articles about using Shared connection but I failed to make it. Thank you for your help.
>>What I've done are:
>>1. In the VFP setting, checked the "Share connection" and saved as default.
>>2. Create a database, create a valid connection with "connection string".
>>3. Add a view using that connection and set it as "shared connection".
>>4. Modify that connection and put dumpy "aaaa" in the PWD and UID.
>>5. Establish a connection :
>> n1=sqlstringconnect('DSN=testdb;UID=dba_test;PWD=test;SERVER=testdb;')
>> The n1 is work. I've tested it by SQLEXEC().
>>6. Use the remote view: USE TEST1.
>>
>>But I always got a message ->Connectivity error: invalid username/password.
>>
>>Did I miss something ?
>>
>>Wilfred
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform