Thread: ODBC Stuff
Sorry to ask this as I'm sure it's passed throught here but I'm also sure I just looked at the messages briefly and then deleted them becuase I didn't think I'd ever need the information. I'm working on a program that will run on a MS Windows platform and I want it to use a database (PostreSQL) on a Linux box. From the research I've been doing I get the impression that ODBC is the preferred, if not the only, method to do this. So I'm hoping someone can point me at some simple steps (they don't have to be too detailed) on getting a MS Windows application to talk to a PostgreSQL database across a network. I've made a couple of passes over the unixODBC site and came away with a much better understanding but just gave up on the MS (ODBC) site since it looked like more of an advertisement than an information site. The application is being written in perl (ActiveState) and compiled with perl2exe to make the installation impact (not a full perl installation) on the Windows systems a little lighter. Any and all pointers apprciated, Rod -- Roderick A. Anderson raanders@altoplanos.net Altoplanos Information Systems, Inc. Voice: 208.765.6149 212 S. 11th Street, Suite 5 FAX: 208.664.5299 Coeur d'Alene, ID 83814
"Roderick A. Anderson" wrote: > > Sorry to ask this as I'm sure it's passed throught here but I'm also sure > I just looked at the messages briefly and then deleted them becuase I > didn't think I'd ever need the information. > > I'm working on a program that will run on a MS Windows platform and I > want it to use a database (PostreSQL) on a Linux box. From the research > I've been doing I get the impression that ODBC is the preferred, if not > the only, method to do this. So I'm hoping someone can point me at some > simple steps (they don't have to be too detailed) on getting a MS Windows > application to talk to a PostgreSQL database across a network. > > I've made a couple of passes over the unixODBC site and came away with > a much better understanding but just gave up on the MS (ODBC) site since > it looked like more of an advertisement than an information site. > > The application is being written in perl (ActiveState) and compiled > with perl2exe to make the installation impact (not a full perl > installation) on the Windows systems a little lighter. > > Any and all pointers apprciated, > Rod I found getting Excel on Windows 98 accessing PG on Linux via ODBC to be pretty straightforward. Basically, just download and install the pg ODBC driver (v6.50?) from www.postgresql.org and install it on the Win box, make sure your linux pg server is started with '-i', setup your pg_hba.conf file on the linux box (see doc at www.postgresql.org), and that should do it, barring other considerations (firewalls, etc.). You should then be able to "Get External Data" from Excel. Regards, Ed Loehr
I don't see why you need ODBC. For example, we use the Perl DBI::DBD modules to communicate over TCP/IP to our DB servers (PostgreSQL and Oracle) from NT boxes. It seems clean, easy and tidy. For example, a programmer here with ZERO Perl experience, bought and read the "Learning Perl" book, installed the ActiveState Perl and the DBI::DBD modules and wrote a deamon to query an Oracle DB and serve up the returned DNA sequences to other machines on the network. The work from start to finish, including learning Perl, took less than two weeks. (The deamon's job is to eliminate the large time delay in making Oracle connections; by keeping the connections open and using them when required, it can send out DNA sequences much faster than individual programs making the same request.). For more information on the Perl DBI interface, see: http://www.symbolstone.org/technology/perl/DBI/index.html Good Luck, Mark "Roderick A. Anderson" wrote: > I'm working on a program that will run on a MS Windows platform and I > want it to use a database (PostreSQL) on a Linux box. From the research > I've been doing I get the impression that ODBC is the preferred, if not > the only, method to do this. So I'm hoping someone can point me at some > simple steps (they don't have to be too detailed) on getting a MS Windows > application to talk to a PostgreSQL database across a network. > > The application is being written in perl (ActiveState) and compiled > with perl2exe to make the installation impact (not a full perl > installation) on the Windows systems a little lighter. > -- Mark Dalphin email: mdalphin@amgen.com Mail Stop: 29-2-A phone: +1-805-447-4951 (work) One Amgen Center Drive +1-805-375-0680 (home) Thousand Oaks, CA 91320 fax: +1-805-499-9955 (work)
"Roderick A. Anderson" wrote: > Sorry to ask this as I'm sure it's passed throught here but I'm also sure > I just looked at the messages briefly and then deleted them becuase I > didn't think I'd ever need the information. > > I'm working on a program that will run on a MS Windows platform and I > want it to use a database (PostreSQL) on a Linux box. From the research > I've been doing I get the impression that ODBC is the preferred, if not > the only, method to do this. So I'm hoping someone can point me at some > simple steps (they don't have to be too detailed) on getting a MS Windows > application to talk to a PostgreSQL database across a network. > > I've made a couple of passes over the unixODBC site and came away with > a much better understanding but just gave up on the MS (ODBC) site since > it looked like more of an advertisement than an information site. > > The application is being written in perl (ActiveState) and compiled > with perl2exe to make the installation impact (not a full perl > installation) on the Windows systems a little lighter. I don't venture into the windows world, but can I assume that DBI/DBD doesn't work in the perl install you describe? If DBI/DBD works then you should be golden. Assuming that DBI/DBDdoes work, then you should be able to connect over TCP/IP without any need for ODBC Karl DeBisschop www.infoplease.com
Ed Loehr wrote: > > "Roderick A. Anderson" wrote: > > > > Sorry to ask this as I'm sure it's passed throught here but I'm also sure > > I just looked at the messages briefly and then deleted them becuase I > > didn't think I'd ever need the information. > > > > I'm working on a program that will run on a MS Windows platform and I > > want it to use a database (PostreSQL) on a Linux box. From the research > > I've been doing I get the impression that ODBC is the preferred, if not > > the only, method to do this. So I'm hoping someone can point me at some > > simple steps (they don't have to be too detailed) on getting a MS Windows > > application to talk to a PostgreSQL database across a network. > > > > I've made a couple of passes over the unixODBC site and came away with > > a much better understanding but just gave up on the MS (ODBC) site since > > it looked like more of an advertisement than an information site. > > > > The application is being written in perl (ActiveState) and compiled > > with perl2exe to make the installation impact (not a full perl > > installation) on the Windows systems a little lighter. > > > > Any and all pointers apprciated, > > Rod > > I found getting Excel on Windows 98 accessing PG on Linux via ODBC to be > pretty straightforward. Basically, just download and install the pg ODBC > driver (v6.50?) from www.postgresql.org and install it on the Win box, make > sure your linux pg server is started with '-i', setup your pg_hba.conf file > on the linux box (see doc at www.postgresql.org), and that should do it, > barring other considerations (firewalls, etc.). You should then be able to > "Get External Data" from Excel. Oops...I didn't read carefully that you have a windows perl app. I think there is a perl module at CPAN for accessing via ODBC, though I've not used it ... http://search.cpan.org/doc/GSAR/libwin32-0.151/blib/lib/Win32/ODBC.pm Regards, Ed Loehr
On Thu, 27 Apr 2000, Mark Dalphin wrote: > I don't see why you need ODBC. For example, we use the Perl DBI::DBD modules to > communicate over TCP/IP to our DB servers (PostgreSQL and Oracle) from NT > boxes. It seems clean, easy and tidy. OOPS, a little bit of knowledge is a dangerous thing. I was assuming a ODBC Windows thingy was needed. I do seem to remember vaguely a discussion in the Perl DBI book about performance, ease of interface, etc. between ODBC, DBI, (and I think DBI::DBD::ODBC). I'll have to look tonight. Thanks to all that offered suggestions. My preference is the perl-way so I'll give it a spin. There is another project coming up that will require ODBC (I think) to pull data out of an ACCESS database and get it into PostgreSQL so this will be helpful later. Again thanks to all, Rod -- Roderick A. Anderson raanders@altoplanos.net Altoplanos Information Systems, Inc. Voice: 208.765.6149 212 S. 11th Street, Suite 5 FAX: 208.664.5299 Coeur d'Alene, ID 83814
> OOPS, a little bit of knowledge is a dangerous thing. I was assuming a > ODBC Windows thingy was needed. I do seem to remember vaguely a > discussion in the Perl DBI book about performance, ease of interface, etc. > between ODBC, DBI, (and I think DBI::DBD::ODBC). I'll have to look > tonight. If I can offer one more piece of (off-topic) advice, when you're doing Windows coding, I personally avoid ODBC unless I absolutely have to, for speed reasons primarily. I'm not familiar with the Jet engine from Microsoft, but the BDE from Borland outperforms ODBC by a factor of five or more, as I imagine that DBI would as well (although I can't say for sure). steve