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 Sergey Alexandrovich Kryukov 530
1 mhegazy94 460
2 Ravi Bhavnani 230
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,205
1 OriginalGriff 6,801
2 CPallini 5,350
3 George Jonsson 3,644
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web04 | 2.8.140922.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