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 22:54pm
Edited 2-Nov-12 23:01pm
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 542
1 ChauhanAjay 180
2 CHill60 135
3 Maciej Los 125
4 RyanDev 118
0 Sergey Alexandrovich Kryukov 9,735
1 OriginalGriff 6,987
2 CPallini 5,835
3 George Jonsson 4,017
4 Gihan Liyanage 3,266


Advertise | Privacy | Mobile
Web02 | 2.8.140926.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