Re: Strange behaviour with Autocad/ODBC

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Postgres ODBC <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Strange behaviour with Autocad/ODBC
Date: 2001-02-20 15:01:29
Message-ID: 20010220090129.A4540@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On Tue, Feb 20, 2001 at 10:50:17AM +0100, Andrea Aime wrote:
> Hi everybody,
> I'm using Autocad Map to perform some GIS work. My data is in vector
> format, and it's linked to tables in a PostgreSQL 7.0.2 database thru
> ODBC. I'm using ODBC driver release 7.01.003. In AutoCAD I can look
> at table with few records, but if I attempt to open a table with 1000
> records AutoCAD crashes. If I ask the driver to use declare/fetch that
> doesn't happens, and I can look at tables of any size (and I see all
> the records, so everything goes fine). I could be happy like this,
> but pgAdmin does not work properly with such option (I cannot see
> the data contained in a table, it complains that it cannot open
> a bi-directional recordset). I'm sure that it's an AutoCAD fault,
> that it's badly written software, but I was wondering why everything
> goes well with declare/fetch... someone can help me?

Hmm, sounds like AutoCAD does something memory intensive with the data.
When you open a table with declare/fetch, the ODBC driver uses a cursor
to only retrieve a few rows at a time from the table. On normal open, you
get _all_ the rows, and the application has to deal with them all at once.

> By the way, AutoCAD 2000 uses ADO to access data (at least, that's
> what they claim, but I also write sw in VB and everything goes fine...)

I'm not sure about these details, but it's possible that with lots of
interface layers, you're getting multiple copies of the datasets resident
in different layers, thereby consuming even more memory.

Have you considered creating _two_ ODBC datasources, both pointing at the
same DB, one with declare/fetch for AutoCAD, and one without, for PgAdmin?

Ross

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Matteo Cavalleri 2001-02-20 16:33:47 Psqlodbc and Centura: here it is a patch
Previous Message Andrea Aime 2001-02-20 09:50:17 Strange behaviour with Autocad/ODBC