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

When I comment out the:

#use DBI; use JDBC;

It yields the tag error mentioned initially on this thread

When I commented out the

use DBI; #use JDBC;

It yields the tag error mentioned initially on this thread

So, to me, both of these modules the use DBI and use JDBC use the Convert::BER

  • Comment on Re^2: On Windows I am trying to run a perl JDBC script, but am running into the error Expecting tag 0x73875f
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: On Windows I am trying to run a perl JDBC script, but am running into the error Expecting tag 0x73875f
by mallett76 (Beadle) on Mar 07, 2025 at 14:15 UTC
    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.