Home All Groups Group Topic Archive Search About

Please help! Database won't update

Author
13 Mar 2006 1:53 AM
Morten Dahl
My database won't update??

I'm using VB.NET 2005 and SQL Server 2005 Express. I Create a Form and a
database. Using the wizard draging the DatabaseDataSet Table on the form.

Everything works fine. I can edit, delete, and add new records (save), but
my changes are not visible when I close and restart the application. The
changes made is in memory only.

Please help me :(


* Visual Basic.NET 2005
* SQL Server 2005 Express
* All on local machine

Example:
Lesson 9:  Databinding Data to User Interface Controls
http://msdn.microsoft.com/vstudio/express/vb/learning/

--
Morten

Author
13 Mar 2006 3:30 AM
Steven Nagy
Are you using a data adapter? Are you calling its Update method?

Show your code please where you think that you are saving the changes
in the dataset back to the database.

SN
Author
13 Mar 2006 5:30 AM
gene kelley
On Mon, 13 Mar 2006 02:53:08 +0100, "Morten Dahl"
<morten.ikkespam@pcforum.no> wrote:

Show quoteHide quote
>My database won't update??
>
>I'm using VB.NET 2005 and SQL Server 2005 Express. I Create a Form and a
>database. Using the wizard draging the DatabaseDataSet Table on the form.
>
>Everything works fine. I can edit, delete, and add new records (save), but
>my changes are not visible when I close and restart the application. The
>changes made is in memory only.
>
>Please help me :(
>
>
>* Visual Basic.NET 2005
>* SQL Server 2005 Express
>* All on local machine
>
>Example:
>Lesson 9:  Databinding Data to User Interface Controls
>http://msdn.microsoft.com/vstudio/express/vb/learning/


Are you talking about close and restarting the app in the IDE or are
you talking about running the app's .exe file?

If you are talking about the IDE, try running an app 'build', and see
if changes are showing up when you close and restart the' build'. By
default in the IDE, every time you run the app, a new copy of the
original DB is copied to the bin/debug folder, hence, it appears that
nothing was updated.  This drove me crazy the first time I played with
DB's in VB2005. 

Gene
Author
13 Mar 2006 10:59 AM
Morten Dahl
"gene kelley" <o***@by.me> wrote in message
news:kiv912921vjbb6kq0f2bc230oits905ouv@4ax.com...

> This drove me crazy the first time I played with
> DB's in VB2005.


Yes, I'm working in develop mode. Now I can see the answer. There is _no_
error. VS2005 reads a copy of the database.

Thanks :)

--
Morten