It's really impossible to help without seeing the error, please post it here. You can edit your post and add it. Here are a few ideas:

It seems unlikely that you are really running Microsoft Access on linux. You're using 'mysql' as a password: is your database actually MySQL?

You're using the VARCHAR2 data type but that's an Oracle data type. I don't know for sure but I don't think you can use it in Access. It causes an error if you try to use it in MySQL.

You have one SQL string in a scalar and one in an array, that's probably not what you want.

For creating tables, once you have a working database handle, I suggest using DBI's do():

my $table1 = "CREATE TABLE table1 ( pike varchar2(200), CodigoEmp varchar2(200), NomEmp varchar2(200), Apellido varchar2(200), NombrePc varchar2(200), DireccionIp varchar2(15), email varchar2(200), posicion varchar2(200), recinto varchar2(200), logu varchar2(200), Logs varchar2(100) )"; $dbh->do( $table1 ) or die $dbh->errstr;

Hope this helps!

The way forward always starts with a minimal test.

In reply to Re: Testing Script ODBC by 1nickt
in thread Testing Script ODBC by emorfa

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.