missing something?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

missing something?

orven_llantos (Bugzilla)
hi guys,

i've been quite for a while in posting help messages
since i've tried my very best in connecting gambas to
postgresql. to the point that i check out the source
code for me to know "what's going on" in linking the
program to postgresql.
prerequisites first. i've installed unix odbc on my
system was able to create a test dsn for postgre. and
it  was successful. i was able to connect. but the sad
thing is when i run gambas2 still the error was
"Cannot find driver for: postgresql." since gambas
searches for its drivers in a default location i've
copied the gambas2 folder (which contains .so's...
etc, usr/local/lib/gambas2) to the default folder
(/usr/lib) so that gambas can "see" it. but still i
see the same error message.
as a desperate attempt, i tried to examine the
different files responsible for the implementation of
gambas2<-->postgre communication. 'til i found
DB_GetDriver. i noticed the code

  strcpy(comp, "gb.db."); (1)
  strcat(comp, type); (2)

Q1: the question that was raised on my mind is what is
it looking; a folder or a .so file? because when (2)
is executed comp would contain "gb.db.postgresql" am i
right or am i missing something? and when i followed
the functions that were called i also noticed that
there was no operation to add a .so to comp to make it
"gb.db.postgresql.so" that is why Q1 was on my mind by
that time. after copying the .so's to /usr/lib, i
attempted to change (1) to

strcpy(comp, "/usr/local/lib/gambas2/gb.db.");

what i did is that i specified the location. the
result? still i cannot connect..... question Q1
remains.
guys, i know that gambas has no warranty whatsoever.
but since gambas claimed to be able to connect to
postgresql and other databases. can you guys tell us
what to do in order to effectively link gambas to any
database that we like? also include some tricks that
we need to learn. please... please....

sincerely,

Orven E. Llantos

Send instant messages to your online friends http://uk.messenger.yahoo.com 


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

RE: missing something?

nigel-4

Orven,

The postgresql driver is not the odbc driver. If you cannot locate gb.db.postgresql.so within one of your folders then you have not compiled the driver. To compile the driver you need the postgresql development package.

In theory you could access postgresql using the odbc driver but then you would need to ensure that you pass the DSN etc. to the driver. Note: This driver is not available through the datamanager, so if you are using that to access your data then you will have a problem.

Nigel

> Message Received: Sep 28 2005, 04:00 AM

> From: "Orven Llantos"
> To: [hidden email]
> Cc:
> Subject: [Gambas-user] missing something?
>
> hi guys,
>
> i've been quite for a while in posting help messages
> since i've tried my very best in connecting gambas to
> postgresql. to the point that i check out the source
> code for me to know "what's going on" in linking the
> program to postgresql.
> prerequisites first. i've installed unix odbc on my
> system was able to create a test dsn for postgre. and
> it was successful. i was able to connect. but the sad
> thing is when i run gambas2 still the error was
> "Cannot find driver for: postgresql." since gambas
> searches for its drivers in a default location i've
> copied the gambas2 folder (which contains .so's...
> etc, usr/local/lib/gambas2) to the default folder
> (/usr/lib) so that gambas can "see" it. but still i
> see the same error message.
> as a desperate attempt, i tried to examine the
> different files responsible for the implementation of
> gambas2<-->postgre communication. 'til i found
> DB_GetDriver. i noticed the code
>
> strcpy(comp, "gb.db."); (1)
> strcat(comp, type); (2)
>
> Q1: the question that was raised on my mind is what is
> it looking; a folder or a .so file? because when (2)
> is executed comp would contain "gb.db.postgresql" am i
> right or am i missing something? and when i followed
> the functions that were called i also noticed that
> there was no operation to add a .so to comp to make it
> "gb.db.postgresql.so" that is why Q1 was on my mind by
> that time. after copying the .so's to /usr/lib, i
> attempted to change (1) to
>
> strcpy(comp, "/usr/local/lib/gambas2/gb.db.");
>
> what i did is that i specified the location. the
> result? still i cannot connect..... question Q1
> remains.
> guys, i know that gambas has no warranty whatsoever.
> but since gambas claimed to be able to connect to
> postgresql and other databases. can you guys tell us
> what to do in order to effectively link gambas to any
> database that we like? also include some tricks that
> we need to learn. please... please....
>
> sincerely,
>
> Orven E. Llantos
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Re: missing something?

orven_llantos (Bugzilla)
In reply to this post by orven_llantos (Bugzilla)
thanks nigel for that clarification. i have the file
that you are referring to: gb.db.postgresql.so but the
problem is still i cannot connect. :(

any tips on what should i do?

Send instant messages to your online friends http://uk.messenger.yahoo.com 


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: missing something?

Christian Faure
El Jueves, 29 de Septiembre de 2005 14:37, Orven Llantos escribió:
> thanks nigel for that clarification. i have the file
> that you are referring to: gb.db.postgresql.so but the
> problem is still i cannot connect. :(
>
> any tips on what should i do?
>
Hi,
If you are using suse 9.3 (for example) NOT use included version of Gambas (is
installed in /opt/kde/...) and database drivers NOT WORK.

Download Gambas source,
If you want compile gambas 1.0.x you need PostgreSQL devel packages 7.x
(Version 8.x not work)

If you want compile gambas2 you need PostgreSQL devel packages 8.x

Once compiled, both work well with PostgreSQL 7 and 8.

Regards,
Christian


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user