Please help! Database won't update

M

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/
 
S

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
 
G

gene kelley

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
 
M

Morten Dahl

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top