Re: [INTERFACES] varchar() access

Поиск
Список
Период
Сортировка
От Byron Nikolaidis
Тема Re: [INTERFACES] varchar() access
Дата
Msg-id 36B0B1B0.3C13B9D3@insightdist.com
обсуждение исходный текст
Ответ на varchar() access  (markh@clockworkweb.com (Mark Himsley))
Ответы Re: [INTERFACES] varchar() access  (markh@clockworkweb.com (Mark Himsley))
Список pgsql-interfaces

Mark Himsley wrote:

> No one has any comment at all?
> Not even 'your a dick-head'!
>

Oops, since I didn't see ODBC in the subject, I missed it.    But hard to miss that line!


> Oh well, I guess I'll have to re-write my code to cope with this problem
> that I am having.
>
> > I'm accessing a postgres 6.3 server on Linux 2.0.35 using the 6.40.0004 ODBC driver on NT 4S.
> >
> > I am having a problem with varchar columns being truncated to 4K bytes when coming from the backend, although I can
store> 4K into the backend. 
> >
> > I have set max LongVarChar to 7000 and -4 (as suggested in the FAQ)
> > I have tried checking and not checking the 'text as LongVarChar' box.
>

Yes indeed, the driver has an internal limit of 4k on text fields *plus* Postgres has a limit of 4k too.  The ability
toset the number was more 
intended for applications that needed it to be lower.  Like Access will allow you to index on a text field if you set
thisnumber to 254. 

We have run into this problem before of the 4k limit.  You could try using large objects, but I'm not too sure how they
willwork with character data, 
as they were more intended for handling LongVarBinary data.  If you are going to create a column in the table yourself
tohold this long char data, 
you should probably check the faq which describes how to setup a "lo" data type.  That is the only way the driver will
recognizeit as a large object. 

Currently, the driver can only "retrieve" the character data from a large object (if this whole thing works), such as
ina BindCol or GetData call.. 
There is no way it would be able to send LongVarChar data to a large object, such as in a BindParameter or
data-at-executionparameter.  It is 
currently only capable of doing this for LongVarBinary data type.

So if you have control over what kind of field you are binding, then you *should* be able to use longvarbinary, and it
possiblywill work. 

The real solution is to allow an option in the driver of mapping a large object to a LongVarChar data type, instead of
atext field. 

Let me know what happens.  Maybe if you hound me on this issue, I may add it.

Anybody else have any feelings on the LongVarChar-->Large Object issue?

Byron




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

Предыдущее
От: Brian Schneider
Дата:
Сообщение: unsubscribe
Следующее
От: "D'Arcy" "J.M." Cain
Дата:
Сообщение: Re: [INTERFACES] Python Interface