473,387 Members | 1,859 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,387 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 2437
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.