Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatically creating a File DSN
Message
From
28/06/2001 20:29:52
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00524501
Message ID:
00524984
Views:
21
Hi Nigel,

Thanks, I'll give it a go.

Regards,
Gavin...

>Alternatively, if you're using ADO, you can create DSNless connections on the fly. Here's example of what I've been doing recently:
>
>
oConn=CreateObject("ADODB.Connection")
>oConn.ConnectionString="Driver={Microsoft Visual FoxPro Driver};SourceDB=\\nbcserver\webdrive\testdata\webtest1.dbc;SourceType=DBC;"
>oConn.Open
>
>oRS=CreateObject("ADODB.RecordSet")
>oRS.Open("Select * from webproducts", oConn)
>
>
>Just need to change around the connection string for Access (even have them all stored in registry or INI. I'm currently planning to disconnect data from one of my apps to allow any data store to be used by VFP app.
>
>>G'Day Andrew,
>>
>> Of course, how simple. It didn't occur to me that a .DSN file was just an .INI type file.
>>
>>Thanks Mate,
>>Gavin...
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform