Click here to Skip to main content
Sign Up to vote bad
good
See more: C#3.0C#4.0
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 ..
 
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 14 Jan '13 - 20:42

Comments
Zoltán Zörgő - 15 Jan '13 - 2:45
1) Why? 2) what has this to do with c#?
David_Wimbley - 15 Jan '13 - 10:39
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)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 255
1 Mahesh Bailwal 230
2 Aarti Meswania 225
3 Ron Beyer 215
4 Rohan Leuva 198
0 Sergey Alexandrovich Kryukov 8,553
1 OriginalGriff 6,899
2 CPallini 3,648
3 Rohan Leuva 2,963
4 Maciej Los 2,308


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid