Yahoo! - After what seems like 3 long years of trying figure it out, I was able to figure it out on some level, with an MS ACCESS connection. Not quite ideal, as I want to connect to Teradata and Trino, but a big step in the right direction. Here is the code for MS Access for others and steps. First, run from the command line:
set CLASSPATH=C:\JARS\ucanaccess.jar;C:\JARS\hsqldb.jar;C:\JARS\jackce +ss.jar;C:\JARS\commons-lang.jar;C:\JARS\commons-logging.jar; + java -Djdbc.drivers=net.ucanaccess.jdbc.UcanaccessDriver -Ddbd.port=12 +345 com.vizdom.dbd.jdbc.Server
Then, all you have to do, is run
use DBI; #COMMENTED OUT ON 2/13/25 my $dsn = "DBI:JDBC:jdbc:ucanaccess://C:/pat +h/to/database.accdb"; #COMMENTED OUT ON 2/20/25 my $dsn = "DBI:JDBC:jdbc:ucanaccess://C:/Wor +k/Programming/jdbcConnectionForNdw/jdbcConnectionForMsAccessTest.accd +b"; #COMMENTED OUT ON 2/27/25 my $dsn = "DBI:JDBC:ucanaccess://C:/Work/Pro +gramming/jdbcConnectionForNdw/jdbcConnectionForMsAccessTest.accdb"; #COMMENTED OUT ON 3/5/25 my $dsn = "dbi:JDBC +:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:/Work/Progra +mming/jdbcConnectionForNdw/jdbcConnectionForMsAccessTest.accdb"; #commented out on 3 +/5/25 BUT WORKS my $dsn = "dbi:ODBC:Driver={Microsoft Access Driver ( +*.mdb, *.accdb)};Dbq=C:\\Work\\Programming\\jdbcConnectionForNdw\\jdb +cConnectionForMsAccessTest.accdb;"; #COMMENTED OUT ON 3/ +6/25 my $dsn = "dbi:JDBC:Driver={Microsoft Access Driver (*.mdb, *.ac +cdb)};Dbq=C:\\Work\\Programming\\jdbcConnectionForNdw\\jdbcConnection +ForMsAccessTest.accdb;"; #COMMENTED OUT ON 3/6/25 my $dsn = "dbi:JDBC:hostname=localhos +t;port=12345;driver=net.ucanaccess.jdbc.UcanaccessDriver;database=C:/ +Work/Programming/jdbcConnectionForNdw/jdbcConnectionForMsAccessTest.a +ccdb"; my $dsn = "DBI:JDBC:hostname=localhost;port=12345;url=jdbc:uca +naccess:///C:/Work/Programming/jdbcConnectionForNdw/jdbcConnectionFor +MsAccessTest.accdb"; my $dbh = DBI->connect($dsn, '', '', { RaiseError => 1 }) or die "Failed to connect to the database: $DBI::errstr"; print "Connected successfully!\n";
A few important notes I found installing the BUNDLE JDBC, not the JDBC was better, as the bundle jdbc has the right encoding modules included.

In reply to Re^3: On Windows I am trying to run a perl JDBC script, but am running into the error Expecting tag 0x73875f by mallett76
in thread On Windows I am trying to run a perl JDBC script, but am running into the error Expecting tag 0x73875f by mallett76

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.