Click here to Skip to main content
15,913,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys!I'm currently making a database project and I want to update an access database.
I connected the database using this sql command
'select*from word'
And I tryied to update the database using this code
VB
ds.tables('word').rows(0).item(1)="cat"
Dim cb as new oledb.oledbcommandbuilder(da)
da.update(ds,"word")

da is a data adapter
ds is a data set
My problem is it giving me an error in runtime.
Any ideas?
-Regards

Update:
Here is the error message.
"Dynamic Sql generation for the update command is not supported against a select command that does not return any key column information"
Can u help me?
Posted
Updated 25-Feb-12 4:24am
v3
Comments
[no name] 25-Feb-12 9:32am    
Can you care to tell us what is the error message?
anuradhapriyankara 25-Feb-12 9:48am    
Here is the error message.
"Dynamic Sql generation for the update command is not supported against a select
command that does not return any key column information"
Can u help me?
Sander Rossel 25-Feb-12 10:28am    
Next time use the "Improve question" button on the lower right side of your question. Put any additional information there. I fixed it for you this time.

1 solution

It seems your database table has no Primary Key defined. Set a Primary Key on your table and try again.
Here's how: Create or modify a primary key - Access[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900