pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Simple Q: Does the ODBC driver support LONGVARCHAR? 2+ messages / 2 participants [nested] [flat]
* Simple Q: Does the ODBC driver support LONGVARCHAR? @ 2000-06-19 19:26 Adam Rossi <adam.rossi@platinumsolutions.com> 2000-06-19 23:18 ` Re: Simple Q: Does the ODBC driver support LONGVARCHAR? Byron Nikolaidis <byron.nikolaidis@home.com> 0 siblings, 1 reply; 2+ messages in thread From: Adam Rossi @ 2000-06-19 19:26 UTC (permalink / raw) To: pgsql-interfaces Does the ODBC driver support longvarchar? It seems that no matter what I do with the settings for the driver, such as checking "Unknowns as LongVarChar", "Text as LongVarChar", "Parse Statements", etc., the longvarchar type NEVER works. In this simple SQL statement: create table test_table testid INTEGER, text_field LONGVARCHAR, var_field VARCHAR(250), char_field CHAR(1)) the field "text_field" defined as type "LONGVARCHAR" will always cause the statement to fail with the following message: ERROR: Unable to locate type name 'longvarchar' in catalog' (#17) If I change the "LONGVARCHAR" to "TEXT", the statement below works fine: create table test_table testid INTEGER, text_field TEXT, var_field VARCHAR(250), char_field CHAR(1)) Since I am relying on some builder tools that only support ODBC standard types (i.e. LONGVARCHAR and not TEXT), it would make my life a lot easier if I could get LONGVARCHAR to work. Is this some deficiency in the driver? Shouldn't an ODBC driver support the major ODBC types? Could anyone point me in the right direction to hack the driver if it currently does not support this syntax? Thanks for your help. - Adam ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Simple Q: Does the ODBC driver support LONGVARCHAR? 2000-06-19 19:26 Simple Q: Does the ODBC driver support LONGVARCHAR? Adam Rossi <adam.rossi@platinumsolutions.com> @ 2000-06-19 23:18 ` Byron Nikolaidis <byron.nikolaidis@home.com> 0 siblings, 0 replies; 2+ messages in thread From: Byron Nikolaidis @ 2000-06-19 23:18 UTC (permalink / raw) To: Adam Rossi <adam.rossi@platinumsolutions.com>; pgsql-interfaces You are supposed to query odbc for the "native" data type names and then use that in your Create Table statement. Use the SQLGetTypeInfo() call -- the TYPE_NAME field is what you want. You can pass either the specific type (SQL_LONGVARCHAR) or SQL_ALL_TYPES to get all of them at once. Quoting from the odbc spec about SQLGetTypeInfo()... TYPE_NAME: Data Source-Dependent data type name... Applications must use this name in CREATE TABLE and ALTER TABLE statements. Byron ----- Original Message ----- From: Adam Rossi <adam.rossi@platinumsolutions.com> To: <pgsql-interfaces@postgresql.org> Sent: Monday, June 19, 2000 3:26 PM Subject: [INTERFACES] Simple Q: Does the ODBC driver support LONGVARCHAR? > Does the ODBC driver support longvarchar? It seems that no matter what I do > with the settings for the driver, such as checking "Unknowns as > LongVarChar", "Text as LongVarChar", "Parse Statements", etc., the > longvarchar type NEVER works. In this simple SQL statement: > > create table test_table > > testid INTEGER, > text_field LONGVARCHAR, > var_field VARCHAR(250), > char_field CHAR(1)) > > the field "text_field" defined as type "LONGVARCHAR" will always cause the > statement to fail with the following message: > > ERROR: Unable to locate type name 'longvarchar' in catalog' (#17) > > If I change the "LONGVARCHAR" to "TEXT", the statement below works fine: > > create table test_table > > testid INTEGER, > text_field TEXT, > var_field VARCHAR(250), > char_field CHAR(1)) > > Since I am relying on some builder tools that only support ODBC standard > types (i.e. LONGVARCHAR and not TEXT), it would make my life a lot easier if > I could get LONGVARCHAR to work. Is this some deficiency in the driver? > Shouldn't an ODBC driver support the major ODBC types? Could anyone point me > in the right direction to hack the driver if it currently does not support > this syntax? > > Thanks for your help. > > - Adam > > ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-06-19 23:18 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-06-19 19:26 Simple Q: Does the ODBC driver support LONGVARCHAR? Adam Rossi <adam.rossi@platinumsolutions.com> 2000-06-19 23:18 ` Byron Nikolaidis <byron.nikolaidis@home.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox