Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have used the odbc to excute the query.
i have attached the access(.mdb) database to the dsn then used the following query
insert into SCRIPT (ID1, NM )
 select '10' as DTID1 , 'DD' as DTNM  Union All
select '20' as DTID1 , 'DRR' as DTNM  Union All
select '30' as DTID1 , 'DDD' as DTNM  Union All
select '40' as DTID1 , 'CXCVX' as DTNM  Union All
select '50' as DTID1 , 'DGFDFG' as DTNM

when i excute the insert query it throws following exception

Execute Query Exception :ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] Query input must contain at least one table or query.


how to excute the above query?
thanks in advance
Posted

1 solution

This looks messy, why can't you just have insert into xxx values(x,y) ?
 
Share this answer
 
Comments
vrushali katkade 7-Feb-12 1:05am    
how to insert the multiple records in access database using one query ?

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