Yes I do have a primary key in both database table and dataset table.
It is an Autonumber field and the database completes it automaticaly.
I know that it works ok since I can see it in my datagrid and I can verify it is unique.
One strange thing is that although the new row isn't added the pk increases every time I run my application and try to insert a new one. I also have checked that the table hasn't got any new rows through Access, thinking that perhaps for some reason the new rows are added but aren't visible through my application.It doesn't happen.
I'm thinking that probably the problem is with the connection to my database since it is password protected and uses an also password protected workgroup information file. But I log on to it through my application with the account that has full rights to it!
Maybe it has something to do with the "OLEdb" options in the "Advanced Properies" of the database connection window of VS. I've searched through the net to find what everyone of these does but I couldn't find any info!
Thanks for your post.
|