DBD::Sybase Error

2001-03-15 Thread Ahmed Shaikh
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

[Fwd: [Fwd: how to check to a database to see if i need update or insert]]

2001-03-15 Thread Xiaoxia Dong
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

Re: DBD::Sybase Error

2001-03-15 Thread Michael Peppler
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;

How do I get multiple rows?

2001-03-15 Thread Scott Phelps
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

Re: How do I get multiple rows?

2001-03-15 Thread Chris Winters
* 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");

RE: [Fwd: [Fwd: how to check to a database to see if i need update or insert]]

2001-03-15 Thread Sterin, Ilya
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

Re: How do I get multiple rows?

2001-03-15 Thread Ronald J Kimball
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");

Installing the ADO::DBD Perl module

2001-03-15 Thread Harrison, JP
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

[ANNOUNCE] DBD::Chart

2001-03-15 Thread Dean Arnold
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

db access through web browser

2001-03-15 Thread Richard Lytle
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

RE: db access through web browser

2001-03-15 Thread Lasker, Sholom Y [IT]
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

single row query rteturn more than one row

2001-03-15 Thread Xiaoxia Dong
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:

need help

2001-03-15 Thread Xiaoxia Dong
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:

Re: single row query rteturn more than one row

2001-03-15 Thread gordon . dewis
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

Re: single row query rteturn more than one row

2001-03-15 Thread Ronald J Kimball
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

Re: single row query rteturn more than one row

2001-03-15 Thread Michael A. Chase
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]

Re: [Fwd: how to check to a database to see if i need update or insert]]

2001-03-15 Thread Michael A. Chase
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

Re: single row query rteturn more than one row

2001-03-15 Thread Michael A. Chase
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 = ?

RE: [Fwd: how to check to a database to see if i need update or insert]]

2001-03-15 Thread Steve Howard
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

Re: [Fwd: how to check to a database to see if i need update or insert]]

2001-03-15 Thread Michael A. Chase
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"

RE: Installing the ADO::DBD Perl module

2001-03-15 Thread Sterin, Ilya
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