SQL ERROR

T

Tyler

I am trying to prepare an SQL statement to read a database. I am
using DBI v1.41 However this code works on an older server that is
running DBI v.1.14. I am putting my values into an array and then
comparing them in the Where clause. Should I have to dereference my
array that I am putting my values into? I have tried to deference by
doing the following. @@arrayname[0] , @arrayname->[0] and
$$arrayname.

Please advise, Thanks

ERROR
==================================
$SQL ERROR: Bad predicate: '^3^'!

SQL ERROR: Couldn't find predicate!

Prepared
SV = RV(0x1baa020) at 0x1c3592c
REFCNT = 1
FLAGS = (PADBUSY,PADMY,ROK)
RV = 0x1e849ec
DBD::CSV::st execute failed: dbih_getcom handle
DBD::CSV::Statement=HASH(0x1e849
ec) is not a DBI handle (has no magic) at
C:/Perl/site/lib/SQL/Statement.pm line
164.
Executed
 
A

A. Sinan Unur

(e-mail address removed) (Tyler) wrote in @posting.google.com:
I am trying to prepare an SQL statement to read a database. I am
using DBI v1.41 However this code works on an older server that is
running DBI v.1.14. I am putting my values into an array and then
comparing them in the Where clause. Should I have to dereference my
array that I am putting my values into? I have tried to deference by
doing the following. @@arrayname[0] , @arrayname->[0] and
$$arrayname.

Please advise, Thanks

Please provide a short but complete script that exhbits the problem you
are experiencing.

Also, you seem to be using symbolic references. It is generally not a
good idea. See

perldoc -q "variable name"

to read why.
 
T

Tad McClellan

Tyler said:
I have tried to deference by
doing the following. @@arrayname[0] , @arrayname->[0] and
$$arrayname.

Please advise, Thanks


I advise against making stuff up and hoping that it works.

If you want to know how to dereference a reference, then read
the std docs about how to dereference a reference:

perldoc perlreftut
perldoc perlref
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,163
Messages
2,570,897
Members
47,435
Latest member
PhilipBelm

Latest Threads

Top