Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have problem with following code;
string plan_insert_command;

C#
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
Updated 2-Nov-12 23:01pm
v3

try this
C#
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())";
 
Share this answer
 
Hai !

may be your mistake passing parmeter is wrong pls check that one
 
Share this answer
 
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!
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900