-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 17 Sep 2000, Marc SCHAEFER wrote:

> J'essaie cette version: /usr/local/lib/libodbcpsql.so, Star-Office 5.1 me
> présente bien cette version-là maintenant dans ``Browse...'',
> j'entre l'utilisateur et le mot de passe. Le message d'erreur est
> maintenant plus clair:
> 
>    ``The database connection failed. Please check if you chose the correct
>      database directory/data source name and, if required, password/userId.
>    ''

OK, on est au même niveau maintenant.

Voici mon /usr/local/etc/odbcinst.ini:

[odbcpsql]
Description             = PostgreSQL driver
Driver          = /usr/local/lib/libodbcpsql.so
Setup           = /usr/local/lib/libodbcpsqlS.so
FileUsage               = 1

et mon /usr/local/etc/odbc.ini:

[gull]
Description             = GULL database
Driver          = odbcpsql
Trace           = Yes
TraceFile               = /tmp/gulltrace.out
Database                = gull
Servername              = localhost
UserName                = gull
Password                = rossen
Port            = 5432
Protocol                = 6.4
ReadOnly                = Yes
RowVersioning           = Yes
ShowSystemTables                = Yes
ShowOidColumn           = Yes
FakeOidIndex            = Yes
ConnSettings            = 

Essaye l'utilitaire isql (qui vient de unixODBC):

gull@desktop:~$ isql gull          
[ISQL]ERROR: Could not SQLConnect

Et avec strace:

gull@desktop:~$ strace 2>strace.out isql gull

Et voyons:

gull@desktop:~$ tail -20 strace.out 
munmap(0x4004f000, 4096)                = 0
open("/usr/local/etc/odbc.ini", O_RDONLY) = 3
close(3)                                = 0
open("/usr/local/etc/odbc.ini", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=326, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x4004f000
read(3, "[gull]\nDescription\t\t= GULL datab"..., 4096) = 326
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x4004f000, 4096)                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sin_family=AF_UNIX,
path="                                                                                 
         /tmp/.s.PGSQL.5432"},
110) = -1 ECONNREFUSED (Connection refused)
close(3)                                = 0
getpid()                                = 31675
getpid()                                = 31675
send(-1, "X\0", 2, 0)                   = -1 EBADF (Bad file descriptor)
munmap(0x401c2000, 232920)              = 0
write(2, "[ISQL]ERROR: Could not SQLConnec"..., 34[ISQL]ERROR: Could not
SQLConnect
) = 34
_exit(1)                                = ?

Puis toi?

Quelques points:

1.) gODBCConfig veut des passwords, même si on n'a pas configuré
"ident" dans pg_hba.conf.  Je ne sais pas si mon conflit vient de là.

2.) gODBCConfig indique trois niveaux de protocol pour PostgreSQL: 6.4,
6.3, et 6.2.  Je utilise PostgreSQL 6.5.  Problème?

Matthieu (si tu lis ceci): tu veux nous expliquer pourquoi on bloque???

Erik Rossen                         ^
[EMAIL PROTECTED]                 /e\
http://www.multimania.com/rossen   ---   GPG key ID: 2935D0B9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: Made with pgp4pine 1.75

iD8DBQE5xMsHY88aPik10LkRAggmAJ9C2VPzVeOv0YSeZmyK0tqCG2pXQgCgmrvx
YLCNCHrij4bygUR/zy5G0qg=
=H2Ms
-----END PGP SIGNATURE-----


--
http://www-internal.alphanet.ch/linux-leman/ avant de poser
une question.

Répondre à