W
Wayne Wengert
I am using ADOX to create an Access table and populate it with one row of
data. The ADOX code sets two columns as primary keys (I can view the table
in Access and see that they are set). When I try to create the UpdateCommand
I get an error that it fails because the Select does not include a primay
key field (the select is "Select * From tablea"). The relavent code is shown
below.
Any ideas on what I am doing wrong are appreciated.
========================================
Dim cmdBldr As New OleDb.OleDbCommandBuilder(da1)
da1.InsertCommand = cmdBldr.GetInsertCommand
da1.UpdateCommand = cmdBldr.GetUpdateCommand
da1.DeleteCommand = cmdBldr.GetDeleteCommand
================================================
Wayne
data. The ADOX code sets two columns as primary keys (I can view the table
in Access and see that they are set). When I try to create the UpdateCommand
I get an error that it fails because the Select does not include a primay
key field (the select is "Select * From tablea"). The relavent code is shown
below.
Any ideas on what I am doing wrong are appreciated.
========================================
Dim cmdBldr As New OleDb.OleDbCommandBuilder(da1)
da1.InsertCommand = cmdBldr.GetInsertCommand
da1.UpdateCommand = cmdBldr.GetUpdateCommand
da1.DeleteCommand = cmdBldr.GetDeleteCommand
================================================
Wayne