Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6: Connecting to Access
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00619586
Message ID:
00621036
Vues:
20
>Ok, on the PC that does not have any Access DSN info in the ODBC manager I receive this error message when I try to connect to the Access database:
>"Data source name not found and no default driver specified."
>
>Here is my DSN-less code (names changed to protect the innocent):
>create database 'INFO' && Create the database
>
>* The install program will create this DSN.
>lcDNS = 'DSN=MS Access Database;' + ;
> 'DBQ=' + allTrim(m.accessdir) + ';' + ;
> 'DefaultDir=' + justPath(m.accessdir) + ';' + ;
> 'DriverId=25;' + ;
> 'FIL=MS Access;' + ;
> 'MaxBufferSize=2048;' + ;
> 'PageTimeout=5;' + ;
> 'UID=admin;'
>
>Create Connection xyz ConnString (lcDNS)
>
>lcssn = ''
>***************** View setup for FINDSSN ***************
>
>create sql view "FINDSSN" ;
> remote connection "XYZ" shared ;
> as select ssn, lastname, firstname, midname, suffix, gender ;
> from info ;
> where info.SSN = ?lcssn
>
>Any ideas on what I am doing wrong???
>Thanks!

When you look at the Drivers tab in the ODBC Manager, what is the listing for Microsoft Access? The driver specification must match that string.

Also, there should be no mention of DSN in your connection string. The whole point is that there is no DSN for this. It should be somethijng like:
lcDNS = 'Driver={MS Access Database};' + ;
		'DBQ=' + allTrim(m.accessdir) + ';' + ;
		'DefaultDir=' + justPath(m.accessdir) + ';' + ;
		'DriverId=25;' + ;
		'FIL=MS Access;' + ;
		'MaxBufferSize=2048;' + ;
		'PageTimeout=5;' + ;
		'UID=admin;'
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform