Skip site navigation (1) Skip section navigation (2)

ODBC: Declare/Fetch & SELECT INTO

From: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
To: "'pgsql-interfaces(at)postgresql(dot)org'" <pgsql-interfaces(at)postgresql(dot)org>
Subject: ODBC: Declare/Fetch & SELECT INTO
Date: 2000-08-31 22:07:28
Message-ID: 8568FC767B4AD311AC33006097BCD3D6091945@woody.vale-housing.co.uk (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hi,

A recent problem with an installation of pgAdmin in which a SELECT INTO
query failed has been caused by the 'Use Declare/Fetch' option in the ODBC
driver being switched on (this has now been proven in 3 seperate cases). I'm
assuming that declare/fetch should not cause this behaviour.

The following is from the commlog - the table is not created, and no error
is raised:

conn=52758652, query='BEGIN'
conn=52758652, query='declare SQL_CUR0325413C cursor for SELECT * INTO
pgadmin_desc FROM pg_description WHERE objoid > 18655'
conn=52758652, query='fetch 100 in SQL_CUR0325413C'
    [ fetched 13 rows ]
conn=52758652, query='declare SQL_CUR03288FE8 cursor for select u.usename,
c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen,
a.atttypmod, a.attnotnull, c.relhasrules from pg_user u, pg_class c,
pg_attribute a, pg_type t where u.usesysid = c.relowner and c.oid=
a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname like
'pg_description' order by attnum'
conn=52758652, query='fetch 100 in SQL_CUR03288FE8'
    [ fetched 2 rows ]
SQLColumns:
table='pg_description',field_name='objoid',type=26,sqltype=268501632,name='o
id'
SQLColumns:
table='pg_description',field_name='description',type=25,sqltype=268501632,na
me='text'
conn=52758652, query='close SQL_CUR03288FE8'
conn=52758652, query='close SQL_CUR0325413C'
conn=52758652, query='END'

Regards, 
  
Dave. 
  
-- 
Disclaimer: the above is the author's personal opinion and is not the
opinion or policy of his employer or of the little green men that have been
following him all day.
http://www.vale-housing.co.uk/ - http://www.pgadmin.freeserve.co.uk/

Responses

pgsql-interfaces by date

Next:From: BillDate: 2000-09-01 00:06:56
Subject: SQLColumns not working (ODBC)
Previous:From: Tom LaneDate: 2000-08-31 21:47:07
Subject: Re: ODBC: Declare/Fetch & SELECT INTO

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group