pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
ODBC reading ini files 2+ messages / 2 participants [nested] [flat]
* ODBC reading ini files @ 2000-08-08 19:40 Chris Ryan <chris@greatbridge.com> 2000-08-08 20:06 ` Re: ODBC reading ini files Ross J. Reedstrom <reedstrm@rice.edu> 0 siblings, 1 reply; 2+ messages in thread From: Chris Ryan @ 2000-08-08 19:40 UTC (permalink / raw) To: pgsql-interfaces I noticed while trying to figure out a problem that GetPrivateProfileString(...) does it's string comparisons while reading the ini file "case sensitive". This actuall turned out to be the reason for my problem as the datasource was in the ini file as "postgresql" and the program was telling the odbc driver to read the datasource "POSTGRESQL" which it could not find cause it was doing the compares case sensitive. Is it written this way for a reason??? If not can it be changed to do a strncmp? Also as a note: If you are trying to get PostgreSQL + Coldfusion working using the pgsql odbc driver make sure your datasource names are in all uppercase in .odbc.ini as Coldfusion always passes the datasource name in all caps. Chris Ryan ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ODBC reading ini files 2000-08-08 19:40 ODBC reading ini files Chris Ryan <chris@greatbridge.com> @ 2000-08-08 20:06 ` Ross J. Reedstrom <reedstrm@rice.edu> 0 siblings, 0 replies; 2+ messages in thread From: Ross J. Reedstrom @ 2000-08-08 20:06 UTC (permalink / raw) To: pgsql-interfaces On Tue, Aug 08, 2000 at 03:40:09PM -0400, Chris Ryan wrote: > I noticed while trying to figure out a problem that > GetPrivateProfileString(...) does it's string comparisons while reading > the ini file "case sensitive". This actuall turned out to be the reason > for my problem as the datasource was in the ini file as "postgresql" and > the program was telling the odbc driver to read the datasource > "POSTGRESQL" which it could not find cause it was doing the compares > case sensitive. > > Is it written this way for a reason??? If not can it be changed to do a > strncmp? > strncmp compares 'n' chars, rather than assuming null terminated. What your looking for is strcasecmp. (Or stncasecmp) > Also as a note: If you are trying to get PostgreSQL + Coldfusion working > using the pgsql odbc driver make sure your datasource names are in all > uppercase in .odbc.ini as Coldfusion always passes the datasource name > in all caps. Hmm, I use PostgreSQL and Coldfusion, and all my datasource names are lowercase. Works fine. I'm not using the ODBC driver that comes with PostgreSQL however: I'm using the UnixODBC driver (that comes with CF) What's your platform and CF version? I'm using Linux for both the database and CF. The only gotcha for me has been that it won't talk to localhost, I need to use the FQDN of the system. Ross -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-08-08 20:06 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2000-08-08 19:40 ODBC reading ini files Chris Ryan <chris@greatbridge.com> 2000-08-08 20:06 ` Ross J. Reedstrom <reedstrm@rice.edu>
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