Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
i have problem with following code;
string plan_insert_command;
 
plan_insert_command += "INSERT INTO QAPower.HDR_COUNTRY_PLAN(COUNTRY_ID,ACCOUNT_ID,PLAN_ID,PLAN_STATUS,DEFAULT_PLAN,INDIAN_RUPEES,US_DOLLAR,EURO,ADD_USER_ID,ADD_USER_DATE)" + "VALUES([QAPower].[GET_COUNTRY_ID]('" + country_name + "')," + 1 + "," + 1 + "," + 1 + "," + 1 + "," + int.Parse(dt_country_plan.Rows[0][0].ToString()) + "," + int.Parse(dt_country_plan.Rows[0][1].ToString()) + "," + int.Parse(dt_country_plan.Rows[0][2].ToString()) + "," + 1 + ",getdate())";
Posted 2-Nov-12 23:54pm
Edited 3-Nov-12 0:01am
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Look at your code: First off, what is in plan_insert_command before you execute the statement? It could be relevant.
 
Next, look at the contents of the first row of your dt_country_plan - there is a good chance that one of the columns does not contain an integer number.
 
Put a breakpoint on the line, and check it with the debugger!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hai !
 
may be your mistake passing parmeter is wrong pls check that one
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

try this
plan_insert_command += "INSERT INTO QAPower.HDR_COUNTRY_PLAN(COUNTRY_ID,ACCOUNT_ID,PLAN_ID,PLAN_STATUS,DEFAULT_PLAN,INDIAN_RUPEES,US_DOLLAR,EURO,ADD_USER_ID,ADD_USER_DATE)" + "VALUES([QAPower].[GET_COUNTRY_ID]('" + country_name + "'),1,1,1,1," + int.Parse(dt_country_plan.Rows[0][0].ToString()) + "," + int.Parse(dt_country_plan.Rows[0][1].ToString()) + "," + int.Parse(dt_country_plan.Rows[0][2].ToString()) + ",1,getdate())";
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 420
1 OriginalGriff 210
2 Kornfeld Eliyahu Peter 210
3 DamithSL 210
4 mukesh mourya 85
0 OriginalGriff 7,215
1 DamithSL 5,199
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,757
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web04 | 2.8.141223.1 | Last Updated 3 Nov 2012
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