Friday 15 June 2012

c# - SQL Server error with tying my database to Form controls -


I am using Visual Studio 2012 Professional with SQL Server 2012 Express. I have created a new Windows Form (C #) project and started it by creating a new data connection and named it as MyShop.mdf . From there I created two tables: customer and order .

I manually populated the client with 6 records and from the Data Sources tab, pulled it in my form and saw that the toolbar appears at the top and the type of data I had determined Based on label and control table data.

When I create and run, I do not show any data entered in the customer table - it works as if the table is empty, even if I 'show the table data', which Anything that I've entered has still remained. Secondly, when I try to add a new record through the form, the following error appears:

File c: \ An automated designated database for users \ darden \ documents \ visual To engage the Number of attempts Studio 2012 \ Projects \ MyShopForm \ MyShopForm \ bin \ Debug \ data is \ MyShop.mdf failed. A database exists with the same name, or the specified file can not be opened, or it is located on the UNC share.

What am I missing? Thanks for your help.

My error on this question ... I should have better: search after this website properly Upon doing, I found the error resolution with the following:



No comments:

Post a Comment