ODBC and configure
am 27.07.2010 08:48:20 von Ravi Katkar --_000_46AC8D44F3AE1F4888F137837D0DF63508853EE010INHYWEXMB2i nf_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi List,
I have installed ODBC and configure the same in RHEL 4.4.
Configured the ODBC in the following way:
[ODBC Data Sources]
testPSQL =3D PostgreSQL Test
[testPSQL]
Driver=3D/usr/lib/psqlodbc.so
Description=3DSample PostgreSQL DSN
DSN=3DtestPSQL
SERVER=3Dxhost+localhost
Username=3Dpostgres
Database=3Drtdb
ReadOnly=3DNo
Servertype=3Dpostgres
Port=3D5432
FetchBufferSize=3D99
ServerOptions=3D
ConnectOptions=3D
Options=3D
ReadOnlyi=3Dno
Trace=3D1
TraceFile=3D/home/postgres/odbc.trace
Debug=3D1
DebugFile =3D /home/postgres/odbc.debug
CommLog =3D 1
[Default]
Driver =3D /usr/lib/psqlodbc.so
Description =3D PostgreSQL Data Source
SERVER=3Dlocalhost
Port=3D5432
UserName=3Dpostgres
Password=3Dpostgres
;Socket=3D4096
;end odbc.ini
[ODBC]
InstallDir =3D /usr/lib/libiodbc.so
#===================3D=3 D=====
==================== =====3D=
==================== =====3D=
===3D#
Steps that I followed to test the ODBC is :
1. Downloaded the "odbctest.c" file from website and copied into unix mac=
hine
2. Compile and run the file
Problem:
While running odbctest testPSQL earlier it was working fine, but now e=
verytime its giving the below error:
odbctest: cannot connect to X server
Please suggest if there is any solution for this. I tried with SERVER=3Dloc=
alhost and xhost+localhost, again Severname=3Dlocalhost and xhost+localhost=
nothing is working after re-compiling and running the .c file.
Thanks,
Ravi Katkar
--_000_46AC8D44F3AE1F4888F137837D0DF63508853EE010INHYWEXMB2i nf_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" xmlns=3D"http://ww=
w.w3.org/TR/REC-html40">
:10.0pt;
font-family:Verdana'>Hi List,
:10.0pt;
font-family:Verdana'>
:10.0pt;
font-family:Verdana'>I have installed ODBC and configure the same in RHEL 4=
..4.
:10.0pt;
font-family:Verdana'>
ize:10.0pt;
font-family:Verdana'>Configured the ODBC in the following way:
span>
:10.0pt;
font-family:Verdana'>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>[ODBC Data Sources]
na>
style=3D'font-size:10.0pt;font-family:Verdana'>testPSQL =3D PostgreSQL Test=
na>
style=3D'font-size:10.0pt;font-family:Verdana'>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>[testPSQL]
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Driver=3D/usr /lib/psqlodbc.s=
o
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Description=3 DSample Postgre=
SQL DSN
na>
style=3D'font-size:10.0pt;font-family:Verdana'>DSN=3DtestPSQ L
na>
style=3D'font-size:10.0pt;font-family:Verdana'>SERVER=3Dxhos t+localhost
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Username=3Dpo stgres
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Database=3Drt db
span>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>ReadOnly=3DNo
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Servertype=3D postgres
o:p>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Port=3D5432
na>
style=3D'font-size:10.0pt;font-family:Verdana'>FetchBufferSi ze=3D99
na>
style=3D'font-size:10.0pt;font-family:Verdana'>ServerOptions =3D
/span>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>ConnectOption s=3D
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Options=3D
na>
style=3D'font-size:10.0pt;font-family:Verdana'>ReadOnlyi=3Dn o
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Trace=3D1
/font>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>TraceFile=3D/ home/postgres/o=
dbc.trace
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Debug=3D1
/font>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>DebugFile =3D
/home/postgres/odbc.debug
na>
style=3D'font-size:10.0pt;font-family:Verdana'>CommLog =3D 1
na>
style=3D'font-size:10.0pt;font-family:Verdana'>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>[Default]
/font>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Driver =3D /usr/lib/psqlodbc=
..so
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Description =3D PostgreSQL D=
ata
Source
na>
style=3D'font-size:10.0pt;font-family:Verdana'>SERVER=3Dloca lhost
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Port=3D5432
na>
style=3D'font-size:10.0pt;font-family:Verdana'>UserName=3Dpo stgres
na>
style=3D'font-size:10.0pt;font-family:Verdana'>Password=3Dpo stgres
na>
style=3D'font-size:10.0pt;font-family:Verdana'>;Socket=3D409 6
na>
style=3D'font-size:10.0pt;font-family:Verdana'>;end odbc.ini
na>
style=3D'font-size:10.0pt;font-family:Verdana'>
na>
style=3D'font-size:10.0pt;font-family:Verdana'>[ODBC]
na>
style=3D'font-size:10.0pt;font-family:Verdana'>InstallDir =3D /usr/lib/libi=
odbc.so
:10.0pt;
font-family:Verdana'>
:10.0pt;
font-family:Verdana'>
:10.0pt;
font-family:Verdana'>#=============3 D=====
==================== =====3D=
==================== =====3D=
==========#
:10.0pt;
font-family:Verdana'>
:10.0pt;
font-family:Verdana'>Steps that I followed to test the ODBC is :
:10.0pt;
font-family:Verdana'>
-
e=3DVerdana>
style=3D'font-size:10.0pt;font-family:Verdana'>Downloaded the “o=
dbctest.c”
file from website and copied into unix machine e=3D2
face=3DVerdana>:p> -
e=3DVerdana>
style=3D'font-size:10.0pt;font-family:Verdana'>Compile and run the fil=
e
ily:Verdana'>
ize:10.0pt;
font-family:Verdana;font-weight:bold'>Problem:
:10.0pt;
font-family:Verdana'> While running
style=3D'font-weight:bold'>odbctest testPSQL earlier it was work=
ing
fine, but now everytime its giving the below error:
:10.0pt;
font-family:Verdana'>
:bold'>odbctest:
cannot connect to X server
:10.0pt;
font-family:Verdana'>
:10.0pt;
font-family:Verdana'>Please suggest if there is any solution for this. I tr=
ied
with SERVER=3Dlocalhost and xhost+localhost, again Severname=3Dlocalhost an=
d
xhost+localhost nothing is working after re-compiling and running the .c fi=
le.
:10.0pt;
font-family:Verdana'>
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Thanks,
color:navy'> Katkar
--_000_46AC8D44F3AE1F4888F137837D0DF63508853EE010INHYWEXMB2i nf_--