Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5, programatically setup ODBC to DBCs
Message
 
 
To
17/12/2002 12:15:04
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00715393
Message ID:
00733900
Views:
27
HiGeoff,

You've to create connection only once. The same way as you do with DSN connection. You can use either CREATE CONNECTION command as in your example above or Connection Designer as mentioned elsewhere in this thread. You've to have DB set because connection is created in DB. It asks you to overwrite because you already have connection with the same name.


>Hi Sergey
>
>
>lcConnStr=[DSN=Visual FoxPro Database;]+;
>	  [DBQ=f:\Work Order Tracking System\wots 2\data\wots.dbc;]+;
>	  [SourceDB=f:\Work Order Tracking System\wots 2\data\wots.dbc;]+;
>	  [SourceType=DBC;]+;
>	  [Exclusive=No;]+;
>	  [BackgroundFetch=Yes;]+;
>	  [Collate=MACHINE;]+;
>	  [Null=Yes;]+;
>	  [Deleted=Yes]
>CREATE CONNECTION rWots CONNSTRING lcConnStr
>
>
>tells me I have not set my database (I can set this but then it asks me if I want to overwrite it)
>
>
>USE wots!v_invhead IN 0 NODATA
>USE wots!v_invitems IN 0 NODATA
>
>
>pops up a the Select Data Source window for each view. Do I have to do something else???
>
>Also, the remote view does not appear to be buffered. I'm not sure why this is???
>
>Regards
>Geoff Scott
>
>>Geoff,
>>
>>You can create such connection in your DB and use it for your remote views. When you create connection, select 'Connection string' and cut and paste connection string from your code (w/o ne wline characters and quotes).
>>
>>>Hi Sergey
>>>
>>>I am even more confused now. Surely I dont want to keep creating the remote connection each time. Perhaps I should step back a bit.
>>>
>>>What I am trying to achieve is to use a remote view via a DSN-Less connection.
>>>
>>>Should I create a connection in my database and then access the views via that?
>>>
>>>I am at a bit of a loss as to how I should implement this as remote views are all a bit new to me. Could you give me an example of how I would do this to access a VisualFoxpro database?
>>>
>>>Regards
>>>Geoff Scott
>>>
>>>
>>>>Geoff,
>>>>
>>>>You cannot use connection handle created by SQLSTRINGCONNECT() or SQLCONNECT() in views in VFP7 and earlier. However, you can create connection to the remote source with connection string and use that connection for your views.
CREATE CONNECTION MyRemConn CONNSTRING lcConnStr
>>>>>Hi Sergey
>>>>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform