If I know bind_param is a method of dbi, how do I get the docs from the
command line?
E.q., perldoc DBI::bind_param ---> it doesn't work.
How do you get the quick docs from one of the CGI's functions by
"perldoc"?
E.q., perldoc CGI::param --> it does not work.
I'd like to know the easy way to ge
On Fri, Jul 16, 2004 at 11:57:05AM -0400, David N Murray wrote:
> You can't use a parameter for the table name. You have to use dynamic sql
> (i.e. put it in the $sql var before the prepare). There's no point in the
> prepare if the DB can't even figure out what table is going to be hit.
>
> Thi
bind_param( ) is meant to bind VALUES only. So one cannot bind
database objects/schema names/ column names etc. Table names, column
names etc
should be mentioned in $sql. Place holders take only values.
. . . .
my $sql = "Select count(*) from $schema_name.$table_name where
$column_name = ?";
. .
You can't use a parameter for the table name. You have to use dynamic sql
(i.e. put it in the $sql var before the prepare). There's no point in the
prepare if the DB can't even figure out what table is going to be hit.
This should be a FAQ, but I didn't see it in there.
hth,
dave
On Jul 16, [E
>> Are you logging on as the owner of the table? If not, you need to qualify
the table name.
Yes I am logging in as the table owner.
\
"Helck, Timothy" <[EMAIL PROTECTED]>
07/16/2004 11:54 AM
To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
cc:
Subject:RE:
You cannot do this. Bind params are not usable for tables. You could use a PL/SQL
block and execute immediate in PL/SQL, but that may not be what you are asking.
-
Ron Reidy
Senior DBA
Array BioPharma, Inc.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROT
Are you logging on as the owner of the table? If not, you need to qualify the table
name.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, July 16, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: Question about bind_param and Oracle
Hi all,
Hoping someone
From: [EMAIL PROTECTED] (PerlDiscuss - Perl Newsgroups and mailing lists)
> I am trying to run an MS SQL server stored procedure using Perl.
> We are using SQL Server 2000. Using the current Perl and DBI.
> Can I use the ODBC DBD?
> I am using a prepare,execute and fetch.
> Has anyone tried this an
Hi all,
Hoping someone can help me out here.
I'm trying to do the following using Oracle 9i and DBI:
$table_name = "USERS";
$sql = "SELECT COUNT(*) FROM ?";
$sth = $dbh->prepare($sql);
$sth->bind_param(1,$table_name);
$sth->execute;
.
.
.
However, I'm getting an error about an invalid table
On 16-Jul-2004 PerlDiscuss - Perl Newsgroups and mailing lists wrote:
> I am trying to run an MS SQL server stored procedure using Perl.
> We are using SQL Server 2000. Using the current Perl and DBI.
> Can I use the ODBC DBD?
> I am using a prepare,execute and fetch.
> Has anyone tried this and d
I am trying to run an MS SQL server stored procedure using Perl.
We are using SQL Server 2000. Using the current Perl and DBI.
Can I use the ODBC DBD?
I am using a prepare,execute and fetch.
Has anyone tried this and do you have examples or how to do this?
I use the 'exec' command but get syntax er
On Fri, 16 Jul 2004, Tim Bunce wrote:
> Checking $sth->{Active} adds extra safety. Something like this:
>
> while(($row = eval { $sth->fetchrow_arrayref }) || ($@ && $sth->{Active})) {
> next unless $row;
> ..
> }
Ok, maybe
while($sth->{Active}) {
$row = eval { $sth->fetchro
Janet Goldstein wrote:
Am I missing something? I searched CPAN for a DBI driver for Microsoft
SQL Server and found only "DBIx::SQLEngine::Driver::MSSQL - Support
DBD::ODBC with Microsoft SQL Server." Is there nothing out there for
SQL Server as there is for Oracle (DBD::Oracle)? Must I go through
O
Thanks for all the help guys.
Bart,
The \015\012 seems to be working fine for me. Thanks for the help.
Mark
-Original Message-
From: Bart Lateur [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 15, 2004 10:37 PM
To: [EMAIL PROTECTED]
Subject: Re: How to insert CR/LF into Sql Server datab
On Fri, Jul 16, 2004 at 03:41:15PM +0400, [EMAIL PROTECTED] wrote:
>
> Hi,
>
> just my 2 cents. How about something like this:
>
> while(($line = eval { $sth->fetchrow_arrayref() }) || $@)
> {
> next unless $line;
> ...
> }
Checking $sth->{Active} adds extra safety. Something like
> From: "Bowen, Mark" <[EMAIL PROTECTED]>
> Date: 2004/07/15 Thu PM 09:53:44 GMT
> the CHAR(13) & CHAR(10) functions, however I cannot get
This should, indeed, work. You need to make sure that Perl sees this
as part of the SQL string, and that MSSQL sees it as part of the SQL
syntax.
somethi
Hi,
just my 2 cents. How about something like this:
while(($line = eval { $sth->fetchrow_arrayref() }) || $@)
{
next unless $line;
...
}
Vadim.
On Thu, 15 Jul 2004, Edward Peschko wrote:
> hey all,
>
> How do you make errors that are otherwise fatal, warnings?
>
> I'm getting
I've arranged a BoF for DBI users at OSCON on Thursday evening (July 29)
http://conferences.oreillynet.com/cs/os2004/view/e_sess/5783
I'll try to arrange some drinks.
I'm also doing a "Perl DBI - Any Questions?" conference session on
Wednesday afternoon:
http://conferences.oreillynet.com/cs
On Thu, Jul 15, 2004 at 04:50:07PM -0700, Edward Peschko wrote:
> hey all,
>
> How do you make errors that are otherwise fatal, warnings?
>
> I'm getting an oracle error which I think is a oracle bug (01801), and only
> effects one row of an otherwise large, large table. I'd like to be able to t
19 matches
Mail list logo