Поиск
Список
Период
Сортировка
Искать

От:
"calios" <calios@celcom.net.my>
Дата:

Hello...i’m a beginner in pgsql…and know nothing about it….

I hope there’s somebody out there could help me….

I’m doing a project called ‘graphical user interface for postgresql database”….

The output has to be like MS Access…interface with functions….

And I’m going to do it using java…..

 

My questions are…

1.can it be done in windows envinronent? I’m using winxp pro

2.how to connect the database? Using odbc or what?

3.what are the other requirements that I need?

 

Pls help me as this is my final year thesis projects…

Thank you….

Re:

От:
Jason Earl <jason.earl@simplot.com>
Дата:
"calios"  writes:

> Hello...i'm a beginner in pgsql...and know nothing about it....  I
> hope there's somebody out there could help me....  I'm doing a
> project called 'graphical user interface for postgresql
> database"....

That's a very descriptive title :).

> The output has to be like MS Access...interface with functions....
> And I'm going to do it using java.....

This sounds like a very useful thing to build.

> My questions are...
> 1.can it be done in windows envinronent? I'm using winxp pro

Yes, Java runs just fine under Windows.

> 2.how to connect the database? Using odbc or what?

You would probably want to connect to the database using PostgreSQL's
JDBC driver.  See: http://jdbc.postgresql.org/

> 3.what are the other requirements that I need?

I am not a Java hacker myself, and so I can't be quite sure what other
Java tools might be useful.

> Pls help me as this is my final year thesis projects...
> Thank you....

Good Luck,
Jason Earl

Re:

От:
"amp " <amp@foomonkey.com>
Дата:
Thanks.  I assume this means I should have a file on my system named libpq.  If so, I can't find it. Where should it be located?  If I don't have it, where can I get it?  Is there an rpm somewhere that has development libraries?  I have checked out the rpms on my redhat cd's and I can't find it there either.  

Also, should my command look like this?

  gcc -Wall -o test1 test1.c -lpq

I have the include file. It is in /usr/include/pgsql/libpq-fe.h.

Thanks again.
Andrew Pierce

---------- Original Message ----------------------------------
From: John Burski 
Date: Mon, 12 Nov 2001 11:53:56 -0600

>Looks like you're missing the "-lpq" linker reference.
>
>Also, don't forget to include the "/usr/include/pgsql/libpq-fe.h" file 
>in your source.  (You know the drill ...  #include  )
>
>Check out the Programmer docs closely, they helped me a lot.
>
>Best regards,
>
>amp wrote:
>
>> Hello, 
>> 
>> I have a new linux system running RedHat 7.2.  The Postgreqsl installation I have is the one that came with RH. I downloaded all the pdfs for Administration, Programmer, Tutorial, etc.  I am trying to write a simple C program to use the database I just created.  My command line looks like this: 
>> 
>> gcc -Wall -o test1 test1.c 
>> 
>> >From this, I get a long list of 'Undefined Reference' errors for any function that starts with 'PQ'. 
>> 
>> I assume I am missing a library or something.  I am new to Linux programming (although I am an experienced C/C++ programmer under windows).   
>> 
>> What am I missing? Thanks in advance. 
>> 

Re:

От:
John Burski <John.Burski@911ep.com>
Дата:
On my Red Hat system, the library in question ("libpq.a") is located in 
the "/usr/lib" directory.  It's in the same directory on a machine with 
a Slackware distro.  You could assume that it can be found in the 
"/usr/lib" directory, but whenever I look for something on a Linux box I 
like to use the "locate" command.  For example, "locate libpq" returns a 
list of filenames that contain the string "libpq".  The list may be 
considerable, so you might want to pipe the output through your favorite 
paging program (I use "less").

As far as where you might get it if it doesn't exist:

The PostgreSQL rpms that I have on my system are as follows:

    postgresql-perl-7.0.3-2
    postgresql-python-7.0.3-2
    postgresql-tcl-7.0.3-2
    postgresql-jdbc-7.0.3-2
    postgresql-devel-7.0.3-2
    postgresql-odbc-7.0.3-2
    postgresql-tk-7.0.3-2
    postgresql-7.0.3-2
    postgresql-server-7.0.3-2
    postgresql-test-7.0.3-2

I'm not certain which one the libpq.a is actually resident in, but if I 
had to hazard a guess I'd pick the "devel" rpm.  Check to see which 
rpm's are installed.  I generated my list by running "rpm -qa | grep 
postgres".  Your PostgreSQL version might be different from mine - I'm 
running version 7.0.3 - I don't know which version is included on the 
Red Hat 7.2 distribution.  All of the relevant RPMs should be on your 
distribution CDs somewhere.

Hope this helps.

amp wrote:

> Thanks.  I assume this means I should have a file on my system named libpq.  If so, I can't find it. Where should it be located?  If I don't have it, where can I get it?  Is there an rpm somewhere that has development libraries?  I have checked out the rpms on my redhat cd's and I can't find it there either.  
> 
> Also, should my command look like this?
> 
>   gcc -Wall -o test1 test1.c -lpq
> 
> I have the include file. It is in /usr/include/pgsql/libpq-fe.h.
> 
> Thanks again.
> Andrew Pierce
> 
> ---------- Original Message ----------------------------------
> From: John Burski 
> Date: Mon, 12 Nov 2001 11:53:56 -0600
> 
>> Looks like you're missing the "-lpq" linker reference.
>> 
>> Also, don't forget to include the "/usr/include/pgsql/libpq-fe.h" file 
>> in your source.  (You know the drill ...  #include  )
>> 
>> Check out the Programmer docs closely, they helped me a lot.
>> 
>> Best regards,
>> 
>> amp wrote:
>> 
>>> Hello, 
>>> 
>>> I have a new linux system running RedHat 7.2.  The Postgreqsl installation I have is the one that came with RH. I downloaded all the pdfs for Administration, Programmer, Tutorial, etc.  I am trying to write a simple C program to use the database I just created.  My command line looks like this: 
>>> 
>>> gcc -Wall -o test1 test1.c 
>>> 
>>> >From this, I get a long list of 'Undefined Reference' errors for any function that starts with 'PQ'. 
>>> 
>>> I assume I am missing a library or something.  I am new to Linux programming (although I am an experienced C/C++ programmer under windows).   
>>> 
>>> What am I missing? Thanks in advance. 
>>> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
> 

-- 
John Burski
I.T. Manager and Systems Administration
911 Emergency Products, Inc.
25 Sixth Avenue North
Saint Cloud, MN  56303
John.Burski@911ep.com

800-863-6911, extension 221
FAX: 800-863-2991
www.911ep.com

Re:

От:
"amp " <amp@foomonkey.com>
Дата:
I found the library.  Mine is in /usr/lib also.  I was looking for a file named libpq, not libpq.a.  I was using the find command.  The locate command worked better. 

Also, I did not realize that the linker would assume the prefix "lib" and the suffix ".a".  When I compiled with a command like this:

  gcc -Wall -o test1 test1.c -lpq

it worked!  

Thanks for your help!

Andrew

---------- Original Message ----------------------------------
From: John Burski 
Date: Mon, 12 Nov 2001 14:39:50 -0600

>On my Red Hat system, the library in question ("libpq.a") is located in 
>the "/usr/lib" directory.  It's in the same directory on a machine with 
>a Slackware distro.  You could assume that it can be found in the 
>"/usr/lib" directory, but whenever I look for something on a Linux box I 
>like to use the "locate" command.  For example, "locate libpq" returns a 
>list of filenames that contain the string "libpq".  The list may be 
>considerable, so you might want to pipe the output through your favorite 
>paging program (I use "less").
>
>As far as where you might get it if it doesn't exist:
>
>The PostgreSQL rpms that I have on my system are as follows:
>
>    postgresql-perl-7.0.3-2
>    postgresql-python-7.0.3-2
>    postgresql-tcl-7.0.3-2
>    postgresql-jdbc-7.0.3-2
>    postgresql-devel-7.0.3-2
>    postgresql-odbc-7.0.3-2
>    postgresql-tk-7.0.3-2
>    postgresql-7.0.3-2
>    postgresql-server-7.0.3-2
>    postgresql-test-7.0.3-2
>
>I'm not certain which one the libpq.a is actually resident in, but if I 
>had to hazard a guess I'd pick the "devel" rpm.  Check to see which 
>rpm's are installed.  I generated my list by running "rpm -qa | grep 
>postgres".  Your PostgreSQL version might be different from mine - I'm 
>running version 7.0.3 - I don't know which version is included on the 
>Red Hat 7.2 distribution.  All of the relevant RPMs should be on your 
>distribution CDs somewhere.
>
>Hope this helps.
>
>amp wrote:
>
>> Thanks.  I assume this means I should have a file on my system named libpq.  If so, I can't find it. Where should it be located?  If I don't have it, where can I get it?  Is there an rpm somewhere that has development libraries?  I have checked out the rpms on my redhat cd's and I can't find it there either.  
>> 
>> Also, should my command look like this?
>> 
>>   gcc -Wall -o test1 test1.c -lpq
>> 
>> I have the include file. It is in /usr/include/pgsql/libpq-fe.h.
>> 
>> Thanks again.
>> Andrew Pierce
>> 
>> ---------- Original Message ----------------------------------
>> From: John Burski 
>> Date: Mon, 12 Nov 2001 11:53:56 -0600
>> 
>>> Looks like you're missing the "-lpq" linker reference.
>>> 
>>> Also, don't forget to include the "/usr/include/pgsql/libpq-fe.h" file 
>>> in your source.  (You know the drill ...  #include  )
>>> 
>>> Check out the Programmer docs closely, they helped me a lot.
>>> 
>>> Best regards,
>>> 
>>> amp wrote:
>>> 
>>>> Hello, 
>>>> 
>>>> I have a new linux system running RedHat 7.2.  The Postgreqsl installation I have is the one that came with RH. I downloaded all the pdfs for Administration, Programmer, Tutorial, etc.  I am trying to write a simple C program to use the database I just created.  My command line looks like this: 
>>>> 
>>>> gcc -Wall -o test1 test1.c 
>>>> 
>>>> >From this, I get a long list of 'Undefined Reference' errors for any function that starts with 'PQ'. 
>>>> 
>>>> I assume I am missing a library or something.  I am new to Linux programming (although I am an experienced C/C++ programmer under windows).   
>>>> 
>>>> What am I missing? Thanks in advance. 
>>>> 
>> 
>> 
>> ---------------------------(end of broadcast)---------------------------
>> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>> 
>> 
>
>-- 
>John Burski
>I.T. Manager and Systems Administration
>911 Emergency Products, Inc.
>25 Sixth Avenue North
>Saint Cloud, MN  56303
>John.Burski@911ep.com
>
>800-863-6911, extension 221
>FAX: 800-863-2991
>www.911ep.com
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
FAQ