Tuesday, 20 August 2013

Appending an numeric value at the and of String

Appending an numeric value at the and of String

i am trying to insert multiple insert in table. For that i have created an
int column table and inserting using for loop function but i am not able
to write proper code which i want to do. i Need some thing like that
for(i=0;i<1800;i++)
{
retcode = SQLPrepare(hstmt,(SQLCHAR *)"insert into dbo.vivtest
values(i)",SQL_NTS);
if (retcode != SQL_SUCCESS)
{
printf("Error in SQLPrepare - insert\n");
odbc_Error(henv,hdbc,hstmt);
getch();
}
else
printf("Successfull execution of %d th Prepare\n",i);
It's giving me error every time.

No comments:

Post a Comment