Running insert query

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

Is there a simple way to execute an insert query (insert records from one
table to another in the same access db)?

Thanks

Regards
 
hi john,

Do you have the query alread in database?
If not:
INSERT INTO target [(field1[, field2[, ...]])] [IN externaldatabase]
SELECT [source.]field1[, field2[, ...]
FROM tableexpression
 
I have the access query ready, I just need the simplest way I can execute it
from vb.net.

Thanks

Regards

Miha Markic said:
hi john,

Do you have the query alread in database?
If not:
INSERT INTO target [(field1[, field2[, ...]])] [IN externaldatabase]
SELECT [source.]field1[, field2[, ...]
FROM tableexpression


--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

John said:
Hi

Is there a simple way to execute an insert query (insert records from one
table to another in the same access db)?

Thanks

Regards
 
Hi John,

Did you try with OleDbCommand, set CommandText to query name and CommandType
to StoredProcedure?
Then call ExecuteNonQuery.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

John said:
I have the access query ready, I just need the simplest way I can execute
it
from vb.net.

Thanks

Regards

Miha Markic said:
hi john,

Do you have the query alread in database?
If not:
INSERT INTO target [(field1[, field2[, ...]])] [IN externaldatabase]
SELECT [source.]field1[, field2[, ...]
FROM tableexpression


--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

John said:
Hi

Is there a simple way to execute an insert query (insert records from one
table to another in the same access db)?

Thanks

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top