pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postodbc on sparc2.5.1
6+ messages / 5 participants
[nested] [flat]

* postodbc on sparc2.5.1
@ 1998-09-02 18:17 John Sharp <JSharp@cfipro.com>
  1998-09-03 02:40 ` Re: [INTERFACES] postodbc on sparc2.5.1 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
  0 siblings, 1 reply; 6+ messages in thread

From: John Sharp @ 1998-09-02 18:17 UTC (permalink / raw)
  To: pgsql-interfaces

     I have been trying to implement postodbc on a solaris sparc 2.5.1.  
     (source distribution from insightdist.com v0249).
     
     I have got it to compile but not load yet.
     
     made the following changes to config.h
     #define WINAPI
     typedef void* HINSTANCE;
     #define INADDR_NONE -1
     
     changed all <config.h> to "config.h".
     
     The following functions weren't found by the loader:
     LoadLibrary
     FreeLibrary
     GetProcAddress
     parse_command
     
     Noticed that parse_command was implemented in parse.c which was left 
     out of the object list.  Added this and parse_command was found by the 
     linker but SQLColumns now not found.  Note: all functions not found by 
     the linker are Window's APIs.
     
     Tried linking in the libiodbc.a file.  The linker found the missing 
     functions but now SQLError is a multiple define.
     
     Should I remove the implementation for SQLError in postodbc to 
     eliminate the final linker error.  Is this the right way to go, or is 
     there some other solution?
     
     John Sharp



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

* Re: [INTERFACES] postodbc on sparc2.5.1
  1998-09-02 18:17 postodbc on sparc2.5.1 John Sharp <JSharp@cfipro.com>
@ 1998-09-03 02:40 ` Thomas G. Lockhart <lockhart@alumni.caltech.edu>
  1998-09-03 15:22   ` Re: [INTERFACES] postodbc on sparc2.5.1 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
  0 siblings, 1 reply; 6+ messages in thread

From: Thomas G. Lockhart @ 1998-09-03 02:40 UTC (permalink / raw)
  To: John Sharp <JSharp@cfipro.com>; +Cc: pgsql-interfaces

> I have been trying to implement postodbc on a solaris sparc 2.5.1.
> (source distribution from insightdist.com v0249).

psqlodbc?

> I have got it to compile but not load yet.
> SQLColumns now not found.  Note: all functions not found by
> the linker are Window's APIs.

SQLColumns is in info.c, which should be in the distribution.

> Tried linking in the libiodbc.a file.  The linker found the missing
> functions but now SQLError is a multiple define.
> Should I remove the implementation for SQLError in postodbc to
> eliminate the final linker error.  Is this the right way to go, or is
> there some other solution?

Wrong way to go. iODBC should _not_ be linked directly with your
psqlodbc image, because it has duplicate routines for every ODBC API! It
relies on explicit dynamic loading to find the psqlodbc routines at
runtime.

You will need to find the linker options which force your psqlodbc
library to resolve all symbols internally. That way it won't be linked
back to iODBC at runtime (which happened to me on Linux). Don't know
what the options would be for Solaris; on Linux it is -Bsymbolic. I had
to include libc and libm in the link step to resolve the printf and pow
functions used by psqlodbc.

You will also need a decent ~/.odbc.ini file. Let me know if you don't
already have one...

                    - Tom



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

* Re: [INTERFACES] postodbc on sparc2.5.1
  1998-09-02 18:17 postodbc on sparc2.5.1 John Sharp <JSharp@cfipro.com>
  1998-09-03 02:40 ` Re: [INTERFACES] postodbc on sparc2.5.1 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
@ 1998-09-03 15:22   ` Thomas G. Lockhart <lockhart@alumni.caltech.edu>
  1998-09-03 15:16     ` Re: [INTERFACES] postodbc on sparc2.5.1 Byron Nikolaidis <byronn@insightdist.com>
  1998-09-03 17:53     ` Re: [INTERFACES] postodbc on sparc2.5.1 Gerald Gryschuk <ggryschuk@scf.sk.ca>
  0 siblings, 2 replies; 6+ messages in thread

From: Thomas G. Lockhart @ 1998-09-03 15:22 UTC (permalink / raw)
  To: Gerald Gryschuk <ggryschuk@scf.sk.ca>; Byron Nikolaidis <byronn@insightdist.com>; +Cc: pgsql-interfaces; Postgres Documentation List <docs@postgresql.org>

> ... maybe you should include your .odbc.ini
> file with the distribution as an example. Obviously it wouldn't work 
> for other people but at least they
> might have a better idea of what to put in it.

I've written some sgml docs which include these files as examples. The
examples are necessary. The combination of section labels required by
iodbc and psqlodbc for the odbcinst.ini and odbc.ini files is not
particularly obvious or consistant. In particular, psqlodbc requires a
section label 'PostgreSQL' in the odbcinst.ini file while iodbc requires
a label of 'Default' for driver info in .odbc.ini afaik.

Unix-specific examples will be in the v6.4 documentation set. Byron and
InsightDist are doing such a good job of supporting the Windows clients
with code and docs that I'm not sure how or if those docs should be
merged with the Postgres doc set. Byron?

> Are you going to release your changes soon?

I'm waiting to hear back from Byron on how he want to re-merge. If he
isn't available soon I'll probably just check things in to the
postgresql.org cvs repository, which is what he might have wanted me to
do anyway.

                        - Tom



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

* Re: [INTERFACES] postodbc on sparc2.5.1
  1998-09-02 18:17 postodbc on sparc2.5.1 John Sharp <JSharp@cfipro.com>
  1998-09-03 02:40 ` Re: [INTERFACES] postodbc on sparc2.5.1 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
  1998-09-03 15:22   ` Re: [INTERFACES] postodbc on sparc2.5.1 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
@ 1998-09-03 15:16     ` Byron Nikolaidis <byronn@insightdist.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Byron Nikolaidis @ 1998-09-03 15:16 UTC (permalink / raw)
  To: Thomas G. Lockhart <lockhart@alumni.caltech.edu>; +Cc: Gerald Gryschuk <ggryschuk@scf.sk.ca>; pgsql-interfaces; Postgres Documentation List <docs@postgreSQL.org>



Thomas G. Lockhart wrote:

> > Are you going to release your changes soon?
>
> I'm waiting to hear back from Byron on how he want to re-merge. If he
> isn't available soon I'll probably just check things in to the
> postgresql.org cvs repository, which is what he might have wanted me to
> do anyway.
>

Ummm, sorry I didn't know you were waiting to hear from me.  Just send me
the stuff and I'll update the repository once I build and test it under
Windows.

Byron




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

* Re: [INTERFACES] postodbc on sparc2.5.1
  1998-09-02 18:17 postodbc on sparc2.5.1 John Sharp <JSharp@cfipro.com>
  1998-09-03 02:40 ` Re: [INTERFACES] postodbc on sparc2.5.1 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
  1998-09-03 15:22   ` Re: [INTERFACES] postodbc on sparc2.5.1 Thomas G. Lockhart <lockhart@alumni.caltech.edu>
@ 1998-09-03 17:53     ` Gerald Gryschuk <ggryschuk@scf.sk.ca>
  1 sibling, 0 replies; 6+ messages in thread

From: Gerald Gryschuk @ 1998-09-03 17:53 UTC (permalink / raw)
  To: Thomas G. Lockhart <lockhart@alumni.caltech.edu>; +Cc: Byron Nikolaidis <byronn@insightdist.com>; pgsql-interfaces; Postgres Documentation List <docs@postgreSQL.org>

Thomas G. Lockhart wrote:
> 
> > ... maybe you should include your .odbc.ini
> > file with the distribution as an example. Obviously it wouldn't work
> > for other people but at least they
> > might have a better idea of what to put in it.
> 
> I've written some sgml docs which include these files as examples. The
> examples are necessary. The combination of section labels required by
> iodbc and psqlodbc for the odbcinst.ini and odbc.ini files is not
> particularly obvious or consistant. In particular, psqlodbc requires a
> section label 'PostgreSQL' in the odbcinst.ini file while iodbc requires
> a label of 'Default' for driver info in .odbc.ini afaik.

iodbc doesn't NEED the 'Default' label but if no other DSN entry is
given when
SQLDriverConnect is called than iodbc uses the 'Default' entry. At least
this is what
should happen if the last parameter to SQLDriverConnect is set to
SQL_DRIVER_NOPROMPT.
If the last parameter is anything else and the DSN ISN'T specificied,
iodbc SHOULD bring up a dialog box which presumably would allow the user
to select a DSN source from their .odbc.ini file. Unfortunately the
function that is supposed to do this called '_iodbcdm_drvconn_dialbox'
is not in iodbc-2.12 and thus the SQLDriverConnect call should fail in
this case, at least that's my reading of the code(see SQLDriverConnect
in file connect.c of iodbc).

Any volunteers for writing this function? I was going to doing something
with this since psqlodbc needs(wants) something similar to allow the
user to change the settings for a specific DSN when its SQLDriverConnect
is called, I just never got around to it.

-- 
Gerald Gryschuk(ggryschuk@scf.sk.ca)
Programmer Analyst
Saskatoon Cancer Centre
((306)655-2746)



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

* Re: [INTERFACES] postodbc on sparc2.5.1
@ 1998-09-03 16:12 Frank Delahoyde <frank@odf.UCSD.EDU>
  0 siblings, 0 replies; 6+ messages in thread

From: Frank Delahoyde @ 1998-09-03 16:12 UTC (permalink / raw)
  To: JSharp@cfipro.com; lockhart@alumni.caltech.edu; +Cc: pgsql-interfaces

I have a working Solaris implementation: 
ftp://odf.ucsd.edu/pub/odf/postODBC.tar.gz (source) or 
ftp://odf.ucsd.edu/pub/odf/postODBC.bin.tar.gz. 


--
	 Frank M. Delahoyde | Phone: 619.822.2751
 Scripps Inst. Oceanography | Fax:   619.534.7383
Oceanographic Data Facility |
   La Jolla, Ca. 92093-0214 | Email: frank@odf.ucsd.edu  




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


end of thread, other threads:[~1998-09-03 17:53 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-02 18:17 postodbc on sparc2.5.1 John Sharp <JSharp@cfipro.com>
1998-09-03 02:40 ` Thomas G. Lockhart <lockhart@alumni.caltech.edu>
1998-09-03 15:22   ` Thomas G. Lockhart <lockhart@alumni.caltech.edu>
1998-09-03 15:16     ` Byron Nikolaidis <byronn@insightdist.com>
1998-09-03 17:53     ` Gerald Gryschuk <ggryschuk@scf.sk.ca>
1998-09-03 16:12 Re: [INTERFACES] postodbc on sparc2.5.1 Frank Delahoyde <frank@odf.UCSD.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