From: gustavo halperin on
Hello

I'm trying to connect to my PostgreSQL using the wxODBC interface. The
"~/.odbc.ini" is very small see below:
[mydbgusti]
Description = PostgreSQL
Driver = PostgreSQL
Trace = No
TraceFile =
Database = mydb
Servername = localhost
Username =
Password =
Port = 5432
Protocol = 6.4
ReadOnly = Yes
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =

When I using the ODBC driver with other application, for example
Openoffice, I use: DNS=mydbgusti, USER=gusti and PASSW=<myPassw>. And
work OK, but with wxODBC I always get:
CONNECTION ERROR - Cannot get DB connection

In the debug I was see that the problem was in the method: "wxDb::Open"
more exactly, in the call to the function "SQLConnect", but the DSN,
user and passw are OK !!

So, any idea what is the problem???

Thank you,
Gustavo

--
I'm thinking. | \\ l\\l_ // |
_ _ | \\/ `/ `.| |
/~\\ \ //~\ | Y | | || Y |
| \\ \ // | | \| | |\ / |
[ || || ] \ | o|o | > /
] Y || || Y [ \___\_--_ /_/__/
| \_|l,------.l|_/ | /.-\(____) /--.\
| >' `< | `--(______)----'
\ (/~`--____--'~\) / U// U / \
`-_>-__________-<_-' / \ / /|
/(_#(__)#_)\ ( .) / / ]
\___/__\___/ `.`' / [
/__`--'__\ |`-' |
/\(__,>-~~ __) | |__
/\//\\( `--~~ ) _l |--:.
'\/ <^\ /^> | ` ( < \\
_\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/
(___\ /___) (____/ (____) `---'


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Seamus Huang on
Two things to check:

1. When you use the OpenOffice and your wx code to connect, are you
running those 2 from the same machine? If not, you should check the
"pg_hba.conf" on PostgreSQL first.
2. Check your code against the ODBC sample

Seamus


gustavo halperin wrote:
> Hello
>
> I'm trying to connect to my PostgreSQL using the wxODBC interface. The
> "~/.odbc.ini" is very small see below:
> [mydbgusti]
> Description = PostgreSQL
> Driver = PostgreSQL
> Trace = No
> TraceFile =
> Database = mydb
> Servername = localhost
> Username =
> Password =
> Port = 5432
> Protocol = 6.4
> ReadOnly = Yes
> RowVersioning = No
> ShowSystemTables = No
> ShowOidColumn = No
> FakeOidIndex = No
> ConnSettings =
>
> When I using the ODBC driver with other application, for example
> Openoffice, I use: DNS=mydbgusti, USER=gusti and PASSW=<myPassw>. And
> work OK, but with wxODBC I always get:
> CONNECTION ERROR - Cannot get DB connection
>
> In the debug I was see that the problem was in the method:
> "wxDb::Open" more exactly, in the call to the function "SQLConnect",
> but the DSN, user and passw are OK !!
>
> So, any idea what is the problem???
>
> Thank you,
> Gustavo
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "Ayen Yang" on
On 8/22/06, gustavo halperin <ggusti(a)gmail.com> wrote:
> Hello
>
> I'm trying to connect to my PostgreSQL using the wxODBC interface. The
> "~/.odbc.ini" is very small see below:
> [mydbgusti]
> Description = PostgreSQL
> Driver = PostgreSQL
> Trace = No
> TraceFile =
> Database = mydb
> Servername = localhost
> Username =
> Password =
> Port = 5432
> Protocol = 6.4
> ReadOnly = Yes
> RowVersioning = No
> ShowSystemTables = No
> ShowOidColumn = No
> FakeOidIndex = No
> ConnSettings =
>
> When I using the ODBC driver with other application, for example
> Openoffice, I use: DNS=mydbgusti, USER=gusti and PASSW=<myPassw>. And
> work OK, but with wxODBC I always get:
> CONNECTION ERROR - Cannot get DB connection
>
> In the debug I was see that the problem was in the method: "wxDb::Open"
> more exactly, in the call to the function "SQLConnect", but the DSN,
> user and passw are OK !!
>
> So, any idea what is the problem???
>
> Thank you,
> Gustavo
>
> --
> I'm thinking. | \\ l\\l_ // |
> _ _ | \\/ `/ `.| |
> /~\\ \ //~\ | Y | | || Y |
> | \\ \ // | | \| | |\ / |
> [ || || ] \ | o|o | > /
> ] Y || || Y [ \___\_--_ /_/__/
> | \_|l,------.l|_/ | /.-\(____) /--.\
> | >' `< | `--(______)----'
> \ (/~`--____--'~\) / U// U / \
> `-_>-__________-<_-' / \ / /|
> /(_#(__)#_)\ ( .) / / ]
> \___/__\___/ `.`' / [
> /__`--'__\ |`-' |
> /\(__,>-~~ __) | |__
> /\//\\( `--~~ ) _l |--:.
> '\/ <^\ /^> | ` ( < \\
> _\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/
> (___\ /___) (____/ (____) `---'
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>

I think the problem is in odbc.ini
Try to change:
Driver = PostgreSQL
to
Driver = <path to psqlodbc.so>

Maybe it'll help. Good luck.

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Thomas Zehbe on
This config works on my machine:

[ODBC Data Sources]
mosys = psqlodbc

[mosys]
Driver = /usr/local/lib/psqlodbcw.so
Host = localhost
Server = localhost
Servername = localhost
Database = mosys
Username = tz
Port = 5432
Tracing = 3
TraceFile = ./odbctrace.log
Debugging = 3
DebugFile = ./odbcdebug.log
Trace = 1
TraceAutoStop = 1

Regards
Thomas


Am Dienstag, 22. August 2006 04:07 schrieb gustavo halperin:
> Hello
>
> I'm trying to connect to my PostgreSQL using the wxODBC interface. The
> "~/.odbc.ini" is very small see below:
> [mydbgusti]
> Description = PostgreSQL
> Driver = PostgreSQL
> Trace = No
> TraceFile =
> Database = mydb
> Servername = localhost
> Username =
> Password =
> Port = 5432
> Protocol = 6.4
> ReadOnly = Yes
> RowVersioning = No
> ShowSystemTables = No
> ShowOidColumn = No
> FakeOidIndex = No
> ConnSettings =
>
> When I using the ODBC driver with other application, for example
> Openoffice, I use: DNS=mydbgusti, USER=gusti and PASSW=<myPassw>. And
> work OK, but with wxODBC I always get:
> CONNECTION ERROR - Cannot get DB connection
>
> In the debug I was see that the problem was in the method: "wxDb::Open"
> more exactly, in the call to the function "SQLConnect", but the DSN,
> user and passw are OK !!
>
> So, any idea what is the problem???
>
> Thank you,
> Gustavo

--
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: gustavo halperin on
Thank you,
After your solution is work.
Gustavo

Ayen Yang wrote:
> On 8/22/06, gustavo halperin <ggusti(a)gmail.com> wrote:
>> Hello
>>
>> I'm trying to connect to my PostgreSQL using the wxODBC interface. The
>> "~/.odbc.ini" is very small see below:
>> [mydbgusti]
>> Description = PostgreSQL
>> Driver = PostgreSQL
>> Trace = No
>> TraceFile =
>> Database = mydb
>> Servername = localhost
>> Username =
>> Password =
>> Port = 5432
>> Protocol = 6.4
>> ReadOnly = Yes
>> RowVersioning = No
>> ShowSystemTables = No
>> ShowOidColumn = No
>> FakeOidIndex = No
>> ConnSettings =
>>
>> When I using the ODBC driver with other application, for example
>> Openoffice, I use: DNS=mydbgusti, USER=gusti and PASSW=<myPassw>. And
>> work OK, but with wxODBC I always get:
>> CONNECTION ERROR - Cannot get DB connection
>>
>> In the debug I was see that the problem was in the method: "wxDb::Open"
>> more exactly, in the call to the function "SQLConnect", but the DSN,
>> user and passw are OK !!
>>
>> So, any idea what is the problem???
>>
>> Thank you,
>> Gustavo
>>
>> --
>> I'm thinking. | \\ l\\l_ // |
>> _ _ | \\/ `/ `.| |
>> /~\\ \ //~\ | Y | | || Y |
>> | \\ \ // | | \| | |\ / |
>> [ || || ] \ | o|o | > /
>> ] Y || || Y [ \___\_--_ /_/__/
>> | \_|l,------.l|_/ | /.-\(____) /--.\
>> | >' `< | `--(______)----'
>> \ (/~`--____--'~\) / U// U / \
>> `-_>-__________-<_-' / \ / /|
>> /(_#(__)#_)\ ( .) / / ]
>> \___/__\___/ `.`' / [
>> /__`--'__\ |`-' |
>> /\(__,>-~~ __) | |__
>> /\//\\( `--~~ ) _l |--:.
>> '\/ <^\ /^> | ` ( < \\
>> _\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/
>> (___\ /___) (____/ (____) `---'
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>
>>
>
> I think the problem is in odbc.ini
> Try to change:
> Driver = PostgreSQL
> to
> Driver = <path to psqlodbc.so>
>
> Maybe it'll help. Good luck.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>


--
I'm thinking. | \\ l\\l_ // |
_ _ | \\/ `/ `.| |
/~\\ \ //~\ | Y | | || Y |
| \\ \ // | | \| | |\ / |
[ || || ] \ | o|o | > /
] Y || || Y [ \___\_--_ /_/__/
| \_|l,------.l|_/ | /.-\(____) /--.\
| >' `< | `--(______)----'
\ (/~`--____--'~\) / U// U / \
`-_>-__________-<_-' / \ / /|
/(_#(__)#_)\ ( .) / / ]
\___/__\___/ `.`' / [
/__`--'__\ |`-' |
/\(__,>-~~ __) | |__
/\//\\( `--~~ ) _l |--:.
'\/ <^\ /^> | ` ( < \\
_\ >-__-< /_ ,-\ ,-~~->. \ `:.___,/
(___\ /___) (____/ (____) `---'


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org