473,473 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2442
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.