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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top