pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postdrv ODBC driver problems
4+ messages / 3 participants
[nested] [flat]

* postdrv ODBC driver problems
@ 1999-03-03 03:54  Ben Gunter <bgunter@alef.gcsu.edu>
  0 siblings, 2 replies; 4+ messages in thread

From: Ben Gunter @ 1999-03-03 03:54 UTC (permalink / raw)
  To: pgsql-interfaces

After version 0.95 of PgAccess was released (thanks so much for the
quick response!), I figured my problems with character case were
resolved.  Unfortunately, I tried to use the ODBC driver with MS Excel
97, and encountered the same problem.  Tables with mixed case field
names gave me errors, and tables with all lower case field names worked.

MS Query could see the table fine (named "Present") and reported the
names of the fields fine ("First Name" and "Last Name"), but it failed
when I actually executed the query.  It said: func_get_detail: no such
attribute or function "lastname".

This looks like the same problem I was having with PgAccess.  Am I
missing something?

I'm using version 6.40.0004 of the ODBC driver, and PostgreSQL 6.4.2.

I'm sorry I don't have the logs right now.  I can't get to the machines
I use Windows on until tomorrow.  It shouldn't be too difficult to
recreate the error if you want to look into it.  Just try to access a
table that uses mixed case field names and/or spaces.  If you still want
to see the logs, let me know; I'll try to send them tomorrow.

Thanks,
Ben



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [INTERFACES] postdrv ODBC driver problems
@ 1999-03-03 16:48  Byron Nikolaidis <byronn@insightdist.com>
  parent: Ben Gunter <bgunter@alef.gcsu.edu>
  1 sibling, 0 replies; 4+ messages in thread

From: Byron Nikolaidis @ 1999-03-03 16:48 UTC (permalink / raw)
  To: Ben Gunter <bgunter@alef.gcsu.edu>; +Cc: pgsql-interfaces; David Hartwig <daybee@bellatlantic.net>



Ben Gunter wrote:

> After version 0.95 of PgAccess was released (thanks so much for the
> quick response!), I figured my problems with character case were
> resolved.  Unfortunately, I tried to use the ODBC driver with MS Excel
> 97, and encountered the same problem.  Tables with mixed case field
> names gave me errors, and tables with all lower case field names worked.
>
> MS Query could see the table fine (named "Present") and reported the
> names of the fields fine ("First Name" and "Last Name"), but it failed
> when I actually executed the query.  It said: func_get_detail: no such
> attribute or function "lastname".
>

Yes, it is a known problem with mixed case.  Some Microsoft apps don't
bother to use quotes around table/field names to preserve the case, I guess
cause they assume that every dbms works like Microsoft SQL server.  MSAccess
however does always use quotes so mixed case names are no problem with
MSAccess.

I'm not really sure how to proceed on this one.   Maybe you could just use
all lower case names for now.

It would seem to me that if an identifier (table/field name) is not quoted
in an sql statement, then Postgres should not care about the case and match
on it.  That to me seems like the correct approach.

Any opinions?

Byron







^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [INTERFACES] postdrv ODBC driver problems
@ 1999-03-03 18:58  Christopher R. Jones <cj@interlog.com>
  parent: Ben Gunter <bgunter@alef.gcsu.edu>
  1 sibling, 1 reply; 4+ messages in thread

From: Christopher R. Jones @ 1999-03-03 18:58 UTC (permalink / raw)
  To: Byron Nikolaidis <byronn@insightdist.com>; +Cc: pgsql-interfaces

>Yes, it is a known problem with mixed case.  Some Microsoft apps don't
>bother to use quotes around table/field names to preserve the case, I guess
>cause they assume that every dbms works like Microsoft SQL server.  MSAccess
>however does always use quotes so mixed case names are no problem with
>MSAccess.
>
>I'm not really sure how to proceed on this one.   Maybe you could just use
>all lower case names for now.
>
>It would seem to me that if an identifier (table/field name) is not quoted
>in an sql statement, then Postgres should not care about the case and match
>on it.  That to me seems like the correct approach.
>
>Any opinions?
>
>Byron
I have always thought it strange that Access would allow field names with
mixed case and spaces.  I come from the Foxbase side and Visual Foxpro has
maintained the tradition of lower case, no space field names.  It
simplifies things to stick to one naming convention that works for all
databases.





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [INTERFACES] postdrv ODBC driver problems
@ 1999-03-03 19:12  Byron Nikolaidis <byronn@insightdist.com>
  parent: Christopher R. Jones <cj@interlog.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Byron Nikolaidis @ 1999-03-03 19:12 UTC (permalink / raw)
  To: Christopher R. Jones <cj@interlog.com>; +Cc: pgsql-interfaces



Christopher R. Jones wrote:

> >Yes, it is a known problem with mixed case.  Some Microsoft apps don't
> >bother to use quotes around table/field names to preserve the case, I guess
> >cause they assume that every dbms works like Microsoft SQL server.  MSAccess
> >however does always use quotes so mixed case names are no problem with
> >MSAccess.
> >
> >I'm not really sure how to proceed on this one.   Maybe you could just use
> >all lower case names for now.
> >
> >It would seem to me that if an identifier (table/field name) is not quoted
> >in an sql statement, then Postgres should not care about the case and match
> >on it.  That to me seems like the correct approach.
> >
> >Any opinions?
> >
> >Byron
> I have always thought it strange that Access would allow field names with
> mixed case and spaces.  I come from the Foxbase side and Visual Foxpro has
> maintained the tradition of lower case, no space field names.  It
> simplifies things to stick to one naming convention that works for all
> databases.

MSAccess checks to see if the driver supports quoted identifiers.  If it does, it
allows the spaces and mixed case in field/table names.  If it doesn't, it does
not allow those things.

Byron




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~1999-03-03 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-03 03:54 postdrv ODBC driver problems Ben Gunter <bgunter@alef.gcsu.edu>
1999-03-03 16:48 ` Byron Nikolaidis <byronn@insightdist.com>
1999-03-03 18:58 ` Christopher R. Jones <cj@interlog.com>
1999-03-03 19:12   ` Byron Nikolaidis <byronn@insightdist.com>

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