Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot connect to SQL Express
Message
De
12/05/2008 04:18:36
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01316347
Message ID:
01316350
Vues:
15
>Hi.
>I have Sql express loaded on a server.
>In Sql Express Management Studio, I can see all tables fine.
>IN VFP when I use following connection sring:
> MyConn = 'Driver=SQL; Server = .\sqlexpress;Database = D:\Myfolder\MyDatabase; Trusted_Connection = yes'
>
>I get following error:
>Acces to selected database has been denied
>Sql SErver error 4060
>I am loged in as administrator
>I have enabled all protocols for Sql Express.
>
>Anybody got any ideas ??
>
>Regards,
>Gerard

I see several errors in your connection string:
MyConn = 'Driver=SQL Server;Server=.\sqlexpress;Database=MyDatabase; Trusted_Connection=yes'

You should specify the full name of the driver its either "SQL SERVER" either "SQL Native Client"
Also you can't add path to Database, you should only point to logical DataBase name as it is attached in SQL Server.
Check http://www.connectionstrings.com for more info.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform