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
 
Back
Top