Question Problem with the connection

efibo

New member
Joined
Jan 18, 2010
Messages
1
Programming Experience
1-3
I create back up stored procedure to Library DB (library.mdf and log files), in order to use that procedure via vb.net on visual studio. (It gets one parameter of the place where the backup file should be.

I worked fine via sql server 2008 express edition.

When I create the following connection string:
Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\library.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True

and tried to run the procedure via vb.net application, I got the exception:
Database 'Library' does not exist. Make sure that the name is entered correctly.
BACKUP DATABASE is terminating abnormally.

Why it is happened? How to fix it?
 
well
I will never use the string connection as i see it
as DATA SOURCE= COMPUTERNAME\SQLEXPRESS
not AttachDBFileName; instead of it use DATA BASE = {your data base name}
and i have serious doupt for the use of User Instance; personally i will never use it
 
Back
Top