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 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  
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  

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

  Print Answers RSS
0 Maciej Los 404
1 OriginalGriff 379
2 CPallini 145
3 Sergey Alexandrovich Kryukov 142
4 Hard_Rockz 115
0 OriginalGriff 5,634
1 Sergey Alexandrovich Kryukov 4,763
2 Peter Leow 2,954
3 Maciej Los 2,614
4 DamithSL 2,465


Advertise | Privacy | Mobile
Web01 | 2.8.140718.1 | Last Updated 3 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid