|
-
Mar 25th, 2004, 08:45 AM
#1
Thread Starter
Junior Member
Data Form Wizard error for Access DB
Hi,
I am using VB.NET within .NET framework V1.1 to write a windows application to Access XP database (using JET OLE DB 4.0 connection) and can not edit the records.
I used the data form wizard to generate a form to see/edit the tables. After creating the table I can "LOAD" the table to the DataGrid (also tried seperate text boxes). I can navigate and see all the records and sometimes able to delete them. However, when I try to update (change) or add a new record, I get error messages. The first mesage I get is "Syntax error in INSERT INTO Satatement", just after changing a letter of a field and clicking "update" button. I thought the update statement that the wizard generated is somehow errorenous. I then changed the field names by adding a letter "z" in front of them and got "Update requires a valid UpdateCommand when passed DataRow collection with modified rows" error. I further played with the table and reduced it to two colum table, one with autonumber id field and one text description field. When I regenerated the form, the wizard could not generate update or delete command. This was also reported by OleDbAdapter configuration. I then changed the autonumber colum to text and removed the primary key. This time update and delete commands could not be created but I can neither insert a row. It gives me a similar error.
Every time I perform a test, I delete the data set and the form I created previousy and start from scratch. I make the design changes to the access tables within access. My test application has only two forms, one main from which calls the dataform under test.
I have been through few books and could not find any particular subject regarding to this issue, and worse, almost all the examples are on MS SQL server, not on Access database. My gut feeling is that something is utterly wrong in data adapter or the wizard handling the Jet Engine V4.0. I also checked the Microsoft site to see if there is any patch or Service Pack but there is none.
Can anybody help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|