Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle 9i only getting first character of VARCHAR column
I have found the "problem". The select query on the VARCHAR2 column is
getting ONLY the first character, because there was only 1 character
in the column .
The real problem is in code that was utilitzing a stored procedure
that inserted the data . The input parameter was VARCHAR2. And the
input parameter type was DBTYPE_STR but the parameter was bound to a
wchar_t array. This apparently causes just the first character to be
inserted into the database. When this parameter was bound to a char
array, the problem was solved.
On Mon, 12 May 2003 09:22:29 GMT, charles b black <cboozb_at_pacbell.net> wrote:
>I am using the Oracle Provider for OLEDB to access an Oracle 9i
>database. I am trying to retrieve a specific column from a table. The
>column is VARCHAR type.
>I don't get any errors when I call GetData, but when I look at the
>buffer , I can only see the first character of the field , the rest
>are 0's. Nothing I have tried so far has made any difference. I have
>tried changing the column data type from DBTYPE_WSTR to DBTYPE_STR. I
>have tried creating a bigger buffer. But all the changes have had no
>effect.
>
>cbb
Received on Mon May 12 2003 - 15:22:27 CDT