Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Viewers ..I am developing C# based windows application and these Application Front end is MS Access...In this Application I want insert multiple records using one query...my query is ..

SQL
Insert into ReciverAddress(ReciverAddressId,ReciverName,ReciverCompany,ReciverAddress,ReciverState,ReciverCity,ReciveCountryCode,ReciverPostalCode,ReciverContact) values(1,'RAMU GUPTA','EVENZ INDIA','NEW DELHI,DWARKA MOR','Delhi','DWARKA',110078,118877,98768423764)
Insert into ReciverAddress(ReciverAddressId,ReciverName,ReciverCompany,ReciverAddress,ReciverState,ReciverCity,ReciveCountryCode,ReciverPostalCode,ReciverContact) values(2,'ROHAN GUPTA','KMK NETWORK','SURAJ MAL VIHAR','Delhi','NEW DELHI',612361,932749,98634872364)
Insert into ReciverAddress(ReciverAddressId,ReciverName,ReciverCompany,ReciverAddress,ReciverState,ReciverCity,ReciveCountryCode,ReciverPostalCode,ReciverContact) values(3,'RAJESH SHARGOHI','SSS','GHANDHI NAGAR,NEW DELHI','Delhi','LAXMI NAGAR',11006,110096,9716346947)
Insert into ReciverAddress(ReciverAddressId,ReciverName,ReciverCompany,ReciverAddress,ReciverState,ReciverCity,ReciveCountryCode,ReciverPostalCode,ReciverContact) values(4,'PALLAVI AGARWAL','KS Infotech','Uttar pardesh','Uttar Pradesh','MATHURA',110055,999871,98991273982)

but this query is not executed and Given same exception..Exception is
Missing semicolon (;) at end of SQL statement...so given same idea or your views to correct this Exception...Thank you..
Posted
Comments
Zoltán Zörgő 15-Jan-13 2:45am    
1) Why?
2) what has this to do with c#?
David_Wimbley 15-Jan-13 10:39am    
I dont understand, if your exception is missing semi colon and your wanting to do multiple inserts using that sql...why not just add the semi colon and problem solved? Am i missing something?

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