PC: Intel x86
OS : Red Hat Linux 6.2 (Zoot)
Db: Sybase 11.03
Problem:
I want to run my perl 3 Lines script from shell prompt.
a small script like this;
# script name test.pl
Line 1: #!/usr/bin/perl -w
Line 2: use DBI ;
Line 3: use DBD::Sybase;
i provide following line on shell( c-shell)
perl
Xiaoxia Dong wrote:
Xiaoxia Dong wrote:
Dear All:
I am new to perl DBI. I am trying to do something that like machine
uptime, i read all those in from a set of
file. Everytime, if i found machine done, i need to insert a new record,
otherwise, i just need to update
the
Ahmed Shaikh writes:
PC: Intel x86
OS : Red Hat Linux 6.2 (Zoot)
Db: Sybase 11.03
Problem:
I want to run my perl 3 Lines script from shell prompt.
a small script like this;
# script name test.pl
Line 1: #!/usr/bin/perl -w
Line 2: use DBI ;
Line 3: use DBD::Sybase;
Here's what doesn't work:
my $dbh=DBI-connect('dbi:ODBC:scottp', 'user', 'pass',
{RaiseError = 1,
AutoCommit = 1}
) || errorhandler("Database connection error: $DBI::errstr");
$sth=$dbh-prepare("SELECT $content_field FROM $content_table WHERE
* Scott Phelps ([EMAIL PROTECTED]) [010315 10:11]:
Here's what doesn't work:
my $dbh=DBI-connect('dbi:ODBC:scottp', 'user', 'pass',
{RaiseError = 1,
AutoCommit = 1}
) || errorhandler("Database connection error: $DBI::errstr");
Means that your query has a column name that is either wrong or misspelled.
Check the query.
Ilya Sterin
-Original Message-
From: Xiaoxia Dong
To: [EMAIL PROTECTED]
Sent: 3/15/01 7:53 AM
Subject: [Fwd: [Fwd: how to check to a database to see if i need update or
insert]]
Xiaoxia Dong
On Thu, Mar 15, 2001 at 09:54:21AM -0500, Scott Phelps wrote:
Here's what doesn't work:
my $dbh=DBI-connect('dbi:ODBC:scottp', 'user', 'pass',
{RaiseError = 1,
AutoCommit = 1}
) || errorhandler("Database connection error: $DBI::errstr");
I'm a beginning user of MySQL, and I have it running on
both a RedHat Linux box, and a Windows NT box. I'd like to
use the ADO spec (using Visual Basic) to access the MySQL
database. This is of course on the NT box. I can access the
database just fine, and the admin tools work perfectly.
I have
DBD::Chart 0.20 is now available on CPAN. This module
provides a DBI abstraction for rendering charts and graphs.
For more information, see
http://home.earthlink.net/~darnold/dbdchart/
Regards,
Dean Arnold
Hi,
I'm new to perl and am trying to create an access to db's on an NT sql
server via a web page. Can anyone suggest a good example or some
relevant documentation?
Thanks,
Rich
Try this link:
http://www.wdvl.com/Authoring/Languages/Perl/PerlfortheWeb/index6.html
--
From: Richard Lytle[SMTP:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 2:06 PM
To: [EMAIL PROTECTED]
Subject: db access through web browser
Hi,
I'm new to
i got following message when i run sql statement as sql
sql=select up_time from uptime where
startdate = (select GREATEST(startdate)
from uptime where
hostname = 'twister')
DBD::Oracle::st execute failed:
i got following message when i run sql statement as sql
sql=select up_time from uptime where
startdate = (select GREATEST(startdate)
from uptime where
hostname = 'twister')
DBD::Oracle::st execute failed:
try:
select up_time from uptime where
startdate in (select GREATEST(startdate)
from uptime where
hostname = 'twister')
-Original Message-
From: Xiaoxia Dong [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March
On Thu, Mar 15, 2001 at 02:43:45PM -0500, Xiaoxia Dong wrote:
i got following message when i run sql statement as sql
sql=select up_time from uptime where
startdate = (select GREATEST(startdate)
from uptime where
MAX( startdate)
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Xiaoxia Dong" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
This is one of those cases where placeholders would save you a lot of grief.
The value inserted into your SQL for $host is not a valid column name. Even
if you quote it, something like "Joe's_PC" would kill it all over again.
Run 'perldoc DBI' to read the fine manual. The sections on
TMTOWTDI: Since Perl is a procedural language, you can just fetch the first
row you
want.
$dbh - {RaiseError} = 1;
my $uptime;
my $sth - prepare( "select uptime
from uptime
where hostname = ?
Michael,
I'm not sure if the reason for this is oracle specific, or something coming
from PERL, but I know I hate placeholders, and have yet to run into a
situation why they are needed (although I will acknowledge that they are
preferred by many). If I understand the cause of the error to be the
Comments below.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
- Original Message -
From: "Steve Howard" [EMAIL PROTECTED]
To: "Michael A. Chase"
ADO is for Perl you wouldn't be able to use in VB environment, I got that
idea from the way you asked you question. If you want to use Visual Basic
ADO you need to enable in VB environment. But anyways this is not the right
forum to talk about this.
If you are using Perl, then you need to first
21 matches
Mail list logo