Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot connect to SQL Express
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01316347
Message ID:
01316350
Views:
14
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform