pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Ayers <aayers@eldocomp.com>
To: Greg Campbell <greg.campbell@us.michelin.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: ADO Server Cursors and OID
Date: Fri, 12 Sep 2003 13:54:44 -0700
Message-ID: <3F623294.4040403@eldocomp.com> (raw)

Greg Campbell wrote:
> I have created a table with a serial ID (sequenced) key_id field which
> is also the PRIMARY KEY using pgAdmin. I've looked at the create table
> statement. It has a WITHOUT OIDS clause. Table works fine, but I seem to
> be unable to make ADO server side cursors. (VB).
> 
> Is there a key to enabling server side cursors. 
> I can link the table in Access and browse it and change field values. It
> gives the impression of server side cursor, although I do not know if
> that is what it is really doing. The DAO engine->pgODBC may be (must be)
> behaving differently than my ADO code->pgODBC.
> 
> I know I can work around with client side cursors for selects, and use
> INSERT,UPDATE executable queries. But with inserts/updates that have
> many fields or  needing to escape (/') text fields that  might contain
> quotes, the coding can get a little hairy compared to updating a cursor
> field.

I can't tell you what the problem is you are running into. I have never 
used the "WITHOUT OIDS" clause, as a PG user, I am very newbie to all of 
it, there is a lot about PG I still need to learn.

As far as DAO vs. ADO - yes, they operate *very* differently in regards 
to pgODBC - one thing I found that forced me to go to ADO was that in 
DAO you couldn't "double update" a TEXT field type (analogous to Memo 
fields), like you can in DAO:

.AddNew
![field1] = "this"
![field1] = "that"
.update

The second setting of the field would cause the program to fall over. 
ADO didn't have this problem.

If I could do it all over again (I couldn't modify my app to be this way 
when I was converting it from Access to PG - when I mean doing it over, 
I mean from the very beginnning), I would have the backend do all the 
work, and only "interface" via SQL, and completely avoid "cursor 
fields", as you put them.

While the coding would be difficult, I think I could probably come up 
with a reusable function library to make things fairly easy, so that 
something similar to the cursor fields could be done, but the function 
library (or class set, or whatever) would do the translation from what I 
want to the SQL to perform the actions.

I hope someone else is able to diagnose your issue, and that they post 
here so I can learn something as well.

Andrew Ayers
Phoenix, Arizona

-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email, and delete the message. Thank you.



view thread (2+ messages)

Message-ID: <3F623294.4040403@eldocomp.com>
Permalink:  ../3F623294.4040403@eldocomp.com/
Also on:    postgresql.org/message-id/3F623294.4040403@eldocomp.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: aayers@eldocomp.com, greg.campbell@us.michelin.com
  Subject: Re: ADO Server Cursors and OID
  In-Reply-To: <3F623294.4040403@eldocomp.com>
  References: <3F623294.4040403@eldocomp.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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