469,600 Members | 2,231 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,600 developers. It's quick & easy.

VB 2005 express database problems

Hi, hope you guys can help.

I have set up a simple one table db to play with using VB express and
the form sees data already entered but when I use the save button on
the form it does not change or add any of the new records.

BTW I used the wizard to drag the table from data sources window which
adds several properties to the form.

Any ideas why the DB lets you see the data but will not accept updates?

Your help is appreciated.

Apr 29 '06 #1
2 1275
Just,

As you have used the datasource wizard, than it creates a single user update
function for you , therefore with this information nobody can help you. You
should have done something extra that we do'nt know

Cor

<ju**************@hotmail.com> schreef in bericht
news:11*********************@i40g2000cwc.googlegro ups.com...
Hi, hope you guys can help.

I have set up a simple one table db to play with using VB express and
the form sees data already entered but when I use the save button on
the form it does not change or add any of the new records.

BTW I used the wizard to drag the table from data sources window which
adds several properties to the form.

Any ideas why the DB lets you see the data but will not accept updates?

Your help is appreciated.

Apr 29 '06 #2
On 29 Apr 2006 03:57:08 -0700, ju**************@hotmail.com wrote:
Hi, hope you guys can help.

I have set up a simple one table db to play with using VB express and
the form sees data already entered but when I use the save button on
the form it does not change or add any of the new records.

BTW I used the wizard to drag the table from data sources window which
adds several properties to the form.

Any ideas why the DB lets you see the data but will not accept updates?

Your help is appreciated.


Run the .exe file in the bin/debug folder, or the .exe file in the
bin/release folder if you have generated a build. Make some changes to
the db and save. When you rerun the .exe, you should see the changes.
If so, then read this:

From MSDN:
One of the things to know when working with local database files is
that they are treated as any other content files. For desktop
projects, it means that by default, the database file will be copied
to the output folder (aka bin) each time the project is built.

1. If you select local database file in the Solution Explorer window,
you will see a property called ‘Copy to Output’ in the Properties
window. By default it is set to ‘Copy Always’ which means that on each
build, the data files in the project folder will be copied to the
output folder overwriting the existing data files if any. You can set
this property to Copy Never and then manually put a copy of the data
file in the output folder. This way, on subsequent builds, the project
system will leave the datafile in the output folder and not try to
overwrite it with the one from the project. The downside is that you
still have two copies so after you modify the database file using the
app, if you want to work on those changes in the project, you need to
copy it to the project manually and vise-versa.

2. You can leave the data file outside the project and create a
connection to it in Database Explorer. When the IDE asks you to bring
the file into the project, just say no. This way, both the design-time
and the run-time will be using the same data file but the downside is
that the path in the connection string will be hard coded and
therefore it’ll be harder to share the project and deploy the app.
Before deploying the app, just make sure to replace the full path in
the settings with a relative path.

Note: "Copy If Newer" seems a better option if not outside the
project.

Gene
Apr 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by _AnonCoward | last post: by
reply views Thread by Alan M Dunsmuir | last post: by
10 posts views Thread by =?Utf-8?B?UHVuaXQgS2F1cg==?= | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.