Re: ADO Case Sensitivity in Win2000/XP

Поиск
Список
Период
Сортировка
От Andrew Ayers
Тема Re: ADO Case Sensitivity in Win2000/XP
Дата
Msg-id 3F5F5739.5070405@eldocomp.com
обсуждение исходный текст
Ответ на ADO Case Sensitivity in Win2000/XP  ("Greg Campbell" <greg.campbell@us.michelin.com>)
Ответы Re: ADO Case Sensitivity in Win2000/XP  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-odbc
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
informationthat is privileged, confidential and exempt from disclosure under applicable law. If you are not the
intendedaddressee, 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
thismessage in error, please immediately advise the sender by reply email, and delete the message. Thank you. 

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Greg Campbell"
Дата:
Сообщение: ADO Case Sensitivity in Win2000/XP
Следующее
От: "Greg Campbell"
Дата:
Сообщение: Re: ADO Case Sensitivity in Win2000/XP