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 Case Sensitivity in Win2000/XP
Date: Wed, 10 Sep 2003 09:54:17 -0700
Message-ID: <3F5F5739.5070405@eldocomp.com> (raw)

Greg Campbell wrote:
[snip]
> The ODBC driver is seeing lower case and I have to double-quote the
> lower case in the string to make it work.  Lower-casing and
> double-quoting all tables names and field name is the kind of  backend
> specific sql changing I wanted to avoid. Is there a setting on the ODBC
> Driver for Windows that will recognize the mixed case properly?

IIRC, the setting isn't in the ODBC driver settings, but rather in the 
setup of PG.

Strangely enough, with my application I converted a bunch of Access 
tables to PG, and noticed that on the backend, all of them seemed to be 
lowercased (from the POV of psql). On the frontend (a VB6 app), the SQL 
selects and such were mixed case (as that is how the original Access 
tables were defined), but the driver handles it all fine (I am using a 
DSN-less connection, so no special flags are being sent in the 
connection string, other than setting ksqo to false).

One thing to learn from this for future applications is to instead of 
explicitly performing the SQL selects everywhere, have an include with a 
function or something you can call, passing the SQL statement, and 
returning something (the recordset or something, maybe). Everytime you 
do a select, call this function with your SQL statement. Then, if in the 
future you need to do something that will change every statement, you 
can re-parse and change the statement in that one function, instead of 
contemplating changing multiple areas throughout your code. If you find 
that despite what you do, you still need to make the change you 
outlined, perhaps now is the time to do this centralized function.

Andrew Ayers
Phoenix, Arizona
> 
> 
> ***************************************************************
> This email and all files transmitted with it are 
> confidential and intended solely for the use of the 
> individual or entity to whom they are addressed. If you 
> are receiving this email in error please notify the 
> system manager.
> 
> This footnote also confirms that this message 
> has been swept for the presence of computer viruses.
> ***************************************************************
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 


-- 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 (4+ messages)  latest in thread

Message-ID: <3F5F5739.5070405@eldocomp.com>
Permalink:  ../3F5F5739.5070405@eldocomp.com/
Also on:    postgresql.org/message-id/3F5F5739.5070405@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 Case Sensitivity in Win2000/XP
  In-Reply-To: <3F5F5739.5070405@eldocomp.com>
  References: <3F5F5739.5070405@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