Okay, I've never worked with Oracle (and my ODBC memory is foggy), but I'm going to take a few blind stabs in the dark here and I hope it'll be enough to get you started in the right direction.

First off,
use strict;
it's a really good habit to get into. For instance, in your script, what is $Sql_test?
Also, in the line:
$db = new Win32::ODBC("DSN=clamon.world;UID=scott;PWD=tiger");
The documentation I have suggests that you can connect with only the DSN name. (this is the part where the cross the "t's and dot the i's" comes in, but) Make sure that you have the proper driver installed for your DSN type, and try embedding the username and password in the DSN (most of the drivers I've seen will allow you to actually do that).

If in doubt, you could also use ADO (assuming you are on a windows 2000 or higher machine).
use strict; use Win32::OLE; my $db = CreateObject OLE "ADODB.Connection"; $db or die "Whoa partner!"; $db->Open("DSN=clamon.world;UID=scott;PWD=tiger"); my $rs = $db->Execute("SELECT * FROM EMP where EMPNO = 7900"); print ($_)->{Description}."<br>\n" foreach(keys %{$db->Errors()}) unle +ss($rs); while(!$rs->EOF){ #see the ADO documention for getting out the data you want $rs->MoveNext(); }
This is of course an alternate suggestion to try if you're banging your head against this horribly. Note, I haven't tested this, so treat it as if you would any psuedocode. Good luck with it.
    --jay

In reply to Re: Problem getting data from win32::ODBC connection to oracle by JayBonci
in thread Problem getting data from win32::ODBC connection to oracle by RuneK

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.