Hi everybody I'm usuing the walkthrough example in MSDN , I successfully created a SQL database and I can retrieve my data in my application using bound controls and Binding navigator but when I save something i the datebase and close the application and then open it again all the new data i have saved are gone. Even I added the code in my formclosing event Me.AddressesBindingSource.EndEdit() Me.AddressesTableAdapter.Update(Me.FirstDatabaseDataSet.Addresses) and results are the same. Could be this because I dont have admin access to my computer at work? or there is something Im missing here? -- Best regards, Edward
This is a very common complaint for those just getting started. When you incorporate the database file (such as the .mdf) file in your project, when you start to debug the application, the file is copied from the project folder to the debug folder. This means you start debugging with a virgin copy of the database--each time you debug. To fix this, mark the file as "never copy" or "copy only if newer". I discuss the other issues with this approach in my book. hth -- __________________________________________________________________________ William R. Vaughn President and Founder Beta V Corporation Author, Mentor, Dad, Grandpa Microsoft MVP (425) 556-9205 (Pacific time) Hitchhikerâs Guide to Visual Studio and SQL Server (7th Edition) ____________________________________________________________________________________________ "Edward" wrote in message news:051D87AA-B5DC-4A0B-AAC3-E3CE30E103B6@microsoft.com... > Hi everybody > I'm usuing the walkthrough example in MSDN , I successfully created a SQL > database and I can retrieve my data in my application using bound controls > and Binding navigator but when I save something i the datebase and close > the > application and then open it again all the new data i have saved are gone. > Even I added the code in my formclosing event > Me.AddressesBindingSource.EndEdit() > Me.AddressesTableAdapter.Update(Me.FirstDatabaseDataSet.Addresses) > and results are the same. > Could be this because I dont have admin access to my computer at work? or > there is something Im missing here? > -- > Best regards, > Edward