Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I don't know what can I do!
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00600296
Message ID:
00600478
Views:
13
This message has been marked as the solution to the initial question of the thread.
>Hi Mark!
>
>>Once I have the dummy view open, I can then use CursorGetProp() to get the COnnection Handle of that view to use in SPT. The connection of that dummy view is shared, so any other view I open that uses a shared connection will use the connection of this view.
>
>Ok, I've read about it... But I've done some tests and the results:
>
>
>Open Database MyDBase
>Use View_01 ConnString "blá blá blá" in 0
>Use View_02 ConnString "blá blá blá" in 0
>
>
>Note: The "blá blá blá" string is the same in both.
>
>After it, I test the nHandle about each view. To my surprise, View_01 returns 1 and View_02 returns 2.
>
>How can I change it?

DBSetProp('View_01', 'View', 'ShareConnection', .T.)
DBSetProp('View_02', 'View', 'ShareConnection', .T.)

However, you only need to open 1 view using the connection string which is what my sample code does. Once you have a remote view open with a shared connection, all you have to do to open another remote view that has the ShareConnection property set to true is:

USE ANY_VIEW

Anytime you specify a conn string in a USE, you will get an additional connection opened.

>One more question: Once I've created one view (using SQL Server driver) and I have to change my database to Oracle: Can I change the "blá blá blá" string and everthings works?

I very much doubt that. The problem is incompatible data types between SQL Server and Oracle.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform