".
Here's where I need your help. Does anyone know why I am not able to execute the "describe table" command and what should I do to get it working by hook or crook :) (I haven't tried commands like create table or drop table etc. don't expect I'll need to do that.)
Below is a snippet of my code with the error that it returns
# http://www.awilcox.com/geek_stuff/perl/proxy.html
use DBI;
use Data::Dumper;
# declare variables
my ($dbh, $sth, $row);
$dbh= DBI->connect("DBI:Proxy:hostname=192.168.200.101;port=3522;debug
+=1;dsn=dbi:ODBC:dbtest",'test','test') or die $DBI::errstr;
$sth = $dbh->prepare("select f1,f2,f3 from table1 where f1=1");
$sth->execute;
Output:
$VAR1 = {
'f1' => '1',
'f2' => 'A123',
'f3' => 'Vista'
};
The code and output of the desc command:
$sth = $dbh->prepare("desc table1");
$sth->execute;
Output:
DBD::Proxy::st execute failed: Server returned error: Failed to execut
+e method CallMethod: DBD::ODBC::st execute failed: [Oracle][ODBC][Ora
+]ORA-00900: invalid SQL statement
(SQL-42000)(DBD: st_execute/SQLExecute err=-1) at C:/Perl/site/lib/DB
+I/ProxyServer.pm line 344.
Any help will be greatly appreciated.
(Sorry for the long post)
Oyster
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.