I have Sql query consists of multiple tables in ms Access database(has Join Right/inner join) and I would like to insert and Update data on it using ADO.NET. I would be most grateful if someone could provide me with a clear example.

Thanx

I need to know the structure of the tables, the relationship between them, and the names of the fields you want to update.

And please include the query you already have and a description of what you are trying to do.

Thank you very much for your reply.

The SQL query is based on two tables (books and authors) that have one-to-many relationship:

SELECT books.title, books.publisher, books.year, book.ISBN FROM authors RIGHT JOIN books ON authors.author_id = books.author_id where authors.name='John'"

As it can be seen from the SQL statement above, I need to insert data only to the books table with the fields: title, publisher, year and ISBN. The authors table has already data.

I am familiar with the old version of ADO and it was easy to run such this sql statament using ADODB Recordset which can be done in one go. But as a vb.net immigrant, I found difficulty to use DataAdobtar, Dataset and DataRow in Ado.Net, because they need the name of table while I have more than one tables and sometimes I need to insert data to particular tables.

Would really appreciate if you could give me a clear answer.

'Fraid I can't help you with data adaptors and such. I'm strictly a hardcore ADO person. I developed all of my software using vbScript (mostly background data mining/massaging) so all my stuff used bare bones ADO, bulk loads and recordsets. I saw your thread title and did a silent "whee" figuring that I could help out. Bummer.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.