Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Tue, 10 Jun 2008 13:46:10 -0700,    group: microsoft.public.dotnet.languages.vb.data        back       


Saving data problem   
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
date: Tue, 10 Jun 2008 13:46:10 -0700   author:   Edward

Re: Saving data problem   
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
date: Fri, 13 Jun 2008 09:58:33 -0700   author:   William Vaughn [MVP]

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us