TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Antonio March
NA
3
11.6k
Connecting to a mdf file
Sep 24 2010 3:20 PM
I downloaded an example of VB .NET program that opens a mdf file included in the same VB solution. The connectionstring is in the app.config file
I am using VB 2010 Express and SQL Server 2008 R2 (express, too, so free)
but it doesn't work for me.
the app.config is
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="default"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Chinook.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
and the error I get is
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed
and the code is
Dim conn As SqlConnection
conn = New SqlConnection(ConfigurationManager.ConnectionStrings("default").ToString())
I really don't know where to look at.
thanks
Reply
Answers (
1
)
MS SQL Server to MS Access
how to store in a database Access but using a datagridview?