Unable to insert String constants through my function

2003-12-16 Thread shiva shankar
Hi, I USE THIS FUNCTION TO INSERT VALUES TO DIFFERENT VALUES OF MY DATABASE.. void InsertValues(const string &tableName, const string &values) { char ValuesToStore[255]; long datasize; char *EncodedData; char *query; strcpy(ValuesToStore, values.c_str()); EncodedData = new char[strl

myodbc SQLFetch crash

2002-05-12 Thread Shiva Shankar Chetan
i am connecting to mysql thru myodbc using iodbc driver manager. when retrieving data, SQLFetch() crashes with SIGSEGV signal. i 'gdb'ed into SQLFetch() and found that it crashed in the very first statement, ENTER_STMT(pstmt). there are no problems when executing SQLExecDirect and SQLBindCols

sqlbindcol

2002-03-21 Thread Shiva Shankar Chetan
Hi, I am trying to get the following to work but it returns invalid values. SQLINTEGER size; SQLExecDirect (hstmt, "Select 8", SQL_NTS); SQLBindCol(hstmt,1, SQL_C_ULONG, &size,0,NULL); I tried various datatypes for size but I always get some invalid values. Is the above correct or do I need

sqlbindcol

2002-03-20 Thread Shiva Shankar Chetan
Hi, I am trying to get the following to work but it returns invalid values. SQLINTEGER size; SQLExecDirect (hstmt, "Select 8", SQL_NTS); SQLBindCol(hstmt,1, SQL_C_ULONG, &size,0,NULL); I tried various datatypes for size but I always get some invalid value. Is the above correct or do I need to