This is a migrated thread and some comments may be shown as answers.

Problems with SQl Express

2 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Digital Man
Top achievements
Rank 2
Digital Man asked on 07 Sep 2008, 05:01 PM
I was going along fine working on my report in the designer and everything was working. Then I attempted to change the fill query on my report XSD. Now I kee running into connection issues. Whenever I try to change anything I get the following error:

An attempt to attach an auto-named database for file ...... Database1.mdf failed.

Ifound found all kinds of posts all over the net with frustrated developers. I am not using asp.net. This is a standard win forms app using the latest Telerik Reporting component. The report and xsd are in a separate project as per the documentation.

Any ideas?

2 Answers, 1 is accepted

Sort by
0
Digital Man
Top achievements
Rank 2
answered on 07 Sep 2008, 07:50 PM
IN looking into this more it seems my problems are coming from the connection string of the xsd in the report project. It should really be using the connection string defined in the main applications app.config but I'm not sure how to do this. If I leave it set to point directly to the Database1.mdf under the project there is never any data in it since it's the one under the bin folder that has the data. If I set it to |DataDirectory| it's looking for it under the report project folder instead of under the main app's folder. Not sure why it seemed to be working fine when I was first building the report but now it is not. For now I guess I'll need to point it manually to the bin folder.
0
Steve
Telerik team
answered on 08 Sep 2008, 08:43 AM
Hello Dan,

This code library article should point you in the right direction for using the connectionstring from your config files.

Regards,
Steve
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Digital Man
Top achievements
Rank 2
Answers by
Digital Man
Top achievements
Rank 2
Steve
Telerik team
Share this question
or