Mensaje
 
a
28/06/2001 01:45:43
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
General information
Foro:
Visual FoxPro
Category:
Funciones del API WIN32
Miscellaneous
ID de la conversación:
00524501
ID del mensaje:
00524567
Views:
27
This message has been marked as a message which has helped to the initial question of the thread.
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...
>
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Previous
Next
Responder
Mapa
Ver