Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shared connection
Message
From
15/11/2001 05:24:25
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
To
15/11/2001 04:12:26
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:
00581951
Views:
20
This message has been marked as a message which has helped to the initial question of the thread.
Has I said you can only share connections between views and not sqlconnect or sqstringconnect unless you do what I had said.
In my opinion and based on my working experience I don't like views I prefer SPT but this is another issue that have been already discuss in here.

>Hi Alex,
>
>Thank you. But I do read something about Shared Connection in this way. May be I misunderstand. Could you please check the followings:
>
>1. See message on 10 Oct 2001, by Hector Correa in Client/Server. Subject is "Remote Data security, odbc and login".
>2. In VFP help (6.0), Using Visual Foxpro->Programmer's Guide->Working with data->Creating Views. Topics:Sharing Connections for Multiple Remote Views
>
>Thank you to spending time on it.
>Wilfred
>
>>Hi Wilfred you cannot share connections this way when you say that a view has a shared connection that means that all the views will share that connection the views don't use connections created by sqstringconnect or sqlconnect for you to share that connection you must first open the view and then use the CURSORGETPROP("ConnectHandle", viewname) to get the handle to that connection with that handle now you can issue sqlexec() command one thing that you must keep in mind is that if your views are using fetchasneede the the connection may be busy in this case you must first issue a sqlcancel() before you issue the sqlexec().
>>
>>>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
Alexandre Palma
Senior Application Architect
Previous
Reply
Map
View

Click here to load this message in the networking platform