Question about placeholders/variables in insert statements

[email protected] Fri, 4 Jan 2008 15:25:11 -0600
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <OFDE739188.615D165A-ON862573C6.0074ED8B-862573C6.0075BCD3@concentra.com>
All

I have a question regarding Insert statements using placeholders.

Is it possible to replace the placeholders with variables? 
I have tried and it gives me the following error :
        DBD::Sybase::st execute failed: Server message number=128 
severity=15 state=1 line=1 text=The name 'U' is illegal in this context. 
Only constants, constant expressions, or        variables allowed here. 
Column names are illegal.


So for example from this:

$sth=$dbh-prepare("INSERT INTO table (column1, column2) VALUES (?,?)");
$sth->execute($value1, $value2);

to this:

$sth=$sbh->prepare("INSERT INTO table (column1, column2) VALUES ($value1, 
$value2)");
$sth->execute;

Just curious is this is possible

Thanks

Robert Gorrebeeck
EAI Developer
Concentra
5080 Spectrum Drive, Suite 1200W
Addison, TX 75001
972.725.6956
[email protected]
****** CONFIDENTIALITY NOTICE ******
NOTICE: This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message from your system. Thank you.