473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

perl access

I'm stuck on something stupid.

I'm trying to use perl to open up a database handle and I can't find the
right database dsn string.

my $data_source = "dbi:Pg:mydatabase";
my $username = "mydatebasereader";
my $auth = "secret";

my $dbh = DBI->connect($data_source, $username, $auth);

DBI connect('postfix','postfix',...) failed: missing "=" after "postfix"
in connection info string at /home/tallison/bin/perl.pl line 21

I've tried variations on the $data_source but I'm afraid I'm working on
a hit-n-miss process.

Can someone point me?
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
4 2431
Tom Allison <ta******@tacocat.net> wrote:

I'm stuck on something stupid.

I'm trying to use perl to open up a database handle and I can't find the
right database dsn string.

my $data_source = "dbi:Pg:mydatabase";
my $username = "mydatebasereader";
my $auth = "secret";

my $dbh = DBI->connect($data_source, $username, $auth);

DBI connect('postfix','postfix',...) failed: missing "=" after "postfix"
in connection info string at /home/tallison/bin/perl.pl line 21

I've tried variations on the $data_source but I'm afraid I'm working on
a hit-n-miss process.

Can someone point me?


Like this:

my $data_source = "dbi:Pg:dbname=mydatabase";
^^^^^^^

Jim

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2
Tom Allison <ta******@tacocat.net> wrote:

I'm stuck on something stupid.

I'm trying to use perl to open up a database handle and I can't find the
right database dsn string.

my $data_source = "dbi:Pg:mydatabase";
my $username = "mydatebasereader";
my $auth = "secret";

my $dbh = DBI->connect($data_source, $username, $auth);

DBI connect('postfix','postfix',...) failed: missing "=" after "postfix"
in connection info string at /home/tallison/bin/perl.pl line 21

I've tried variations on the $data_source but I'm afraid I'm working on
a hit-n-miss process.

Can someone point me?


Like this:

my $data_source = "dbi:Pg:dbname=mydatabase";
^^^^^^^

Jim

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #3
Jim Seymour wrote:

Like this:

my $data_source = "dbi:Pg:dbname=mydatabase";
^^^^^^^


thank you very much.

Now if I could just authenticate correctly...
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4
Jim Seymour wrote:

Like this:

my $data_source = "dbi:Pg:dbname=mydatabase";
^^^^^^^


thank you very much.

Now if I could just authenticate correctly...
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

58
by: @ | last post by:
A benchmark in 2002 showed PHP is much slower in shell or when Apache has Mod_Perl. With the new PHP kissing Java's ass, Perl is once again the #1 CGI choice. Java is for a big team in short...
1
by: J-miami | last post by:
I am just starting to learn Perl. I had an idea that there should be free open-source Internet Cafe management software for Linux. I searched around online but couldn't find anything. The...
2
by: skeize | last post by:
I'm new to Perl, but not new to Access. I want to hit an Access db with a perl script, and I am looking for good online resources, can anyone help me out? Thanks, Pat
6
by: Doomster | last post by:
In a previous job, we had Perl scripts which could interact with a SQL DB using Perl's DBI module We were able to programmatically add, delete and query tables using this module. Is it possible...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
3
by: Max58kl | last post by:
Trying to access data and print it to the screen using Perl Builders I/O Window -------------------------------------------------------------------------------- Hi I am using a program called...
6
by: kinedesigner | last post by:
We're using a perl script to fetch images from the inhouse server & pump them to a remote server with much higher bandwidth. I want to remove the Everyone account from the target folder on the...
223
by: Pilcrow | last post by:
Given that UNIX, including networking, is almost entirely coded in C, how come so many things are almost impossible in ordinary C? Examples: Network and internet access, access to UNIX...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.