<i><font color="#663300"> I use the userid and password that the user submits to establish the connection with a SQLCONNECT. Is it somehow possible to use this handle number with the views? </font></i>
Unfortunatly, you can't share this connection with the views in 7.0.
<i><font color="#663300"> I went into the Tools>Options>RemoteData and checked the share connection check box. </font></i>
This doesn't do any thing. It is supposed to be a default for views you create, but it doesn't work. What you have to do is edit your two views and when you have the view designer open, choos 'Advanced Options' from the Query menu. There is a check box there, 'Share Connection', turn that on.
<i><font color="#663300"> I created a system datasource, with the userid blank. I created a database connection which uses that datasource, but also leaves the userid and password blank. (the idea being not to store this information anywhere) I create new views (with the new sharing connection checked), two using the connection and two using the data source. </font></i>
Ok, so far so good. But, your best bet is to create the views on the connection rather than the data source. This lets you use more than one data source by changing the connection.
<i><font color="#663300"> I try to browse one of the views and am confronted by the same Oracle ODBC Driver Connect dialog that appears during the creation of the views. I add the userid and password information. </font></i>
OK, this is good. Once you do this, then you can use CursorGetProp('ConnectHandle') and store that to your app object. (For SPT stuff)
<i><font color="#663300"> I try to browse the next view, and again am confronted by the Oracle ODBC Driver dialog. </font></i>
This wouldn't happen if you had set the two views to 'share connection'.
<i><font color="#663300"> So, I am completely unclear about what you are saying should be happening. How do I get the remote views in my VFP database to use the connection established with the SQLCONNECT? </font></i>
You can't. What I do is open a remote view, which is a select of my config table. I set the config properties in my app object and leave this view open. I grad the handle of this view and store it to an app property. This view stays open until the CleanUP code where I close it.
<i><font color="#663300"> The choice of authentication techniques is not mine.</font></i>
Yep, I figured. The above works well. If you don't want the user to get the second 'oracle connect login' you should be able to build a connect string, open the view adding it to the USE command. In the connect sstring you can put the userid and password. This way, they are never stored to the DBC.
Also, if you do this, you are never writting to the DBC, and you can include it in the .EXE if you want. Or, if you want to allow multiple data sets, you can just give every user a local copy of it.
BOb
©2002 Bob Archer |