Received: from mail.rdc1.md.home.com (imail@ha1.rdc1.md.home.com [24.2.2.66]) by hub.org (8.10.1/8.10.1) with ESMTP id e5JNLtM23808 for ; Mon, 19 Jun 2000 19:21:55 -0400 (EDT) Received: from byron ([24.4.141.52]) by mail.rdc1.md.home.com (InterMail vM.4.01.02.00 201-229-116) with SMTP id <20000619232154.HTAV26205.mail.rdc1.md.home.com@byron>; Mon, 19 Jun 2000 16:21:54 -0700 Message-ID: <000b01bfda44$bcc93f00$6401a8c0@byron> From: "Byron Nikolaidis" To: "Adam Rossi" , References: <002801bfda24$4f2d2620$0200a8c0@RSGROUP> Subject: Re: Simple Q: Does the ODBC driver support LONGVARCHAR? Date: Mon, 19 Jun 2000 19:18:54 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200006/81 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 To: 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 > >