Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot connect to SQL Express
Message
From
12/05/2008 04:28:04
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01316347
Message ID:
01316351
Views:
17
>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

Driver=SQL Native Client
Database=MyDatabase

or if you need the path and filename as in your sample:

AttachDbFileName=D:\Myfolder\MyDatabase.mdf;Database=myDatabase

PS: Do not use extra spaces around = while writing the connection string.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform