Nothing inserted (oledb access 2000 - VB.NET 2005)

G

Guest

Hi,

I try to insert a record into an existing access table using VB.NET 2005.
When I use a tableadapter.insert method, the result is obviously 1 record
affected, but no actual record is added to the table.
I tried different ways (oledbcommand executenonquery..), the result remains
the same. The records affected property reports 1 record affeced as well, but
when I open acces directly, no rows are added at all.
I get no error message.
The table has an autonumber column (primary key).
What is going wrong?
Thanks in advance.
Leo
 
G

Guest

Thanks for your reply.

In the meantime I figured out what went wrong: The Copy to Output Directory
setting (of the mdb) was set to the default "Copy always" so after each run
the original (empty) database was copied over the copy in the \bin\debug
folder. I changed it to "Copy never" and now everything is working fine.

Kind regards,
Leo
 

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