Re: figuring out why I am having this issue

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: figuring out why I am having this issue
Дата
Msg-id E7F85A1B5FF8D44C8A1AF6885BC9A0E4AC9DFA@ratbert.vale-housing.co.uk
обсуждение исходный текст
Ответ на figuring out why I am having this issue  ("Joel Fradkin" <jfradkin@wazagua.com>)
Ответы Re: figuring out why I am having this issue  ("Joel Fradkin" <jfradkin@wazagua.com>)
Список pgsql-odbc

> -----Original Message-----
> From: Joel Fradkin [mailto:jfradkin@wazagua.com]
> Sent: 01 September 2005 15:43
> To: Dave Page
> Cc: pgsql-odbc@postgresql.org
> Subject: RE: [ODBC] figuring out why I am having this issue
>
> I would like to look at this code, but searching the source I
> am not even
> seeing it?
>
> char szData[max_longvarchar_size];
> char szChunk[1024];
>
> // Get the data in chunks
> do
> {
>     retcode = SQLGetData(hStmt, 1, SQL_C_CHAR, szChunk,
> sizeof(szChunk), &cbData);
>     strcat(szData, szChunk);
>
> } while (retcode != SQL_SUCCESS && retcode != SQL_NO_DATA);
>
> Maybe I am too out of touch with C to be any help, but I
> should at a minimum
> be able to see the code you are referenceing?

:-)

You won't find that in the source - it's an example to show what your
app (or MS ADO or similar) might be doing wrong. If the actual data
being read in the SQLGetData call is larger than max_longvarchar_size,
it'll overflow szData.

I guess one answer might be to cap the size reported by SQLGetData to
whatever the column size is, but I'm pretty sure that will likely break
things for other people (though it should be fixable by tweaking
maxlongvarcharsize).

Regards, Dave.

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Joel Fradkin"
Дата:
Сообщение: Re: figuring out why I am having this issue
Следующее
От: "Joel Fradkin"
Дата:
Сообщение: Re: figuring out why I am having this issue