Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#3.0 C#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 21:42pm
Comments
Zoltán Zörgő at 15-Jan-13 2:45am
   
1) Why?
2) what has this to do with c#?
David_Wimbley at 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)

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 105
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 15 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100