This is a discussion on bulk insert to IDS 10 DB via UNIXODBC C program fails within the Informix forums, part of the Database Server Software category; --> The code copied below throws this error (val of ret is -2 >--- ERROR -- RC = 0 Reported ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| The code copied below throws this error (val of ret is -2 >--- ERROR -- RC = 0 Reported from insertpic.c, line 111 ------------ Total Number of diagnostic records: 0) I'm trying to do a bulk insert. column1 and column2 are both char [20][50] I can loop through these arrays and see their are values in them. The columns I'm trying to insert into are both char 16. rowcnt is 20. I could probably work it out if I had an example, but I cannot find one. I hope someone can help me, Kate code snippet ret = SQLSetStmtAttr(hstmt, SQL_ATTR_PARAMSET_SIZE, (SQLPOINTER)rowcnt, SQL_IS_I NTEGER); ret = SQLBindCol( hstmt, 1, SQL_C_CHAR, column1, sizeof( column1[ 0 ] ), indicat or1 ); ret = SQLBindCol( hstmt, 2, SQL_C_CHAR, column2, sizeof( column2[ 0 ] ), indicat or2 ); printf("in insertpic\n"); ret = SQLExecDirect(hstmt, "INSERT INTO stk2 (stock, comp) VALUES(?,? )", SQL_NT S); printf("val of ret is %d\n",ret); |
| Thread Tools | |
| Display Modes | |
|
|