Problem using code to access external data

This forum is to report technical problems with Rel.
Post Reply
steved
Posts: 49
Joined: Sun Sep 01, 2013 10:53 pm

Problem using code to access external data

Post by steved » Wed Mar 28, 2018 4:30 am

This VAR declaration to access data in sql server 2016 worked as expected in Rel v3.004 but does not work with v3.010 or v3.011:

Code: Select all

VAR TEST4 EXTERNAL JDBC "jdbc:jtds:sqlserver://localhost:1433;databaseName=JUDYDB1,**,********,TEST1";    
It returns the error:

Code: Select all

ERROR: Encountered "VAR" at line 12, column 1.

Was expecting one of:
 "BEGIN" ...
 "TCLOSE" ...
 <TUPLE> ...
 "WITH" ...
 <TUPLE> ...
In both v3.010 and v3.011 with the (New variable) Choose the kind of variable you wish to create window,
entering in the connection string and other information leads to a successful outcome.
Interestingly, the text for attribute Definition in sys.DefinitioinHistory after the above executes
is the same as the variable declaration except for the implied AUTOKEY at the end of the string.
It would be convenient if the var definition also worked.

Also I could never get the driver for sql server in Accessing External Data Sources, jdbc:sqlserver, to
work. Entering in the following connection string:
"jdbc:sqlserver://localhost:1433;databaseName=JUDYDB1" and the other information leads to the error:

Code: Select all

ERROR: RS0450: EXTERNAL relvar definition failed due to: org.reldb.rel.exceptions.ExceptionSemantic: 
EX0016: java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost:1433;databaseName=JUDYDB1. 
Drivers available: oracle.jdbc.OracleDriver, org.postgresql.Driver, net.sourceforge.jtds.jdbc.Driver, 
org.mariadb.jdbc.Driver
Only the jdbc:jtds:sqlserver driver seems to work with sql server.

thanks

Dave
Site Admin
Posts: 364
Joined: Sun Nov 27, 2005 7:19 pm

Re: Problem using code to access external data

Post by Dave » Wed Mar 28, 2018 9:11 am

steved wrote:
Wed Mar 28, 2018 4:30 am
This VAR declaration to access data in sql server 2016 worked as expected in Rel v3.004 but does not work with v3.010 or v3.011:

Code: Select all

VAR TEST4 EXTERNAL JDBC "jdbc:jtds:sqlserver://localhost:1433;databaseName=JUDYDB1,**,********,TEST1";    
It returns the error:

Code: Select all

ERROR: Encountered "VAR" at line 12, column 1.
The command-line interface mistakenly thinks the // in the JDBC connection string is the start of a comment and incorrectly treats the line as an expression ending in a comment rather than a statement. I've made a note to fix this.
steved wrote:
Wed Mar 28, 2018 4:30 am
Also I could never get the driver for sql server in Accessing External Data Sources, jdbc:sqlserver, to
work. Entering in the following connection string:
"jdbc:sqlserver://localhost:1433;databaseName=JUDYDB1" and the other information leads to the error:

Code: Select all

ERROR: RS0450: EXTERNAL relvar definition failed due to: org.reldb.rel.exceptions.ExceptionSemantic: 
EX0016: java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost:1433;databaseName=JUDYDB1. 
Drivers available: oracle.jdbc.OracleDriver, org.postgresql.Driver, net.sourceforge.jtds.jdbc.Driver, 
org.mariadb.jdbc.Driver
Only the jdbc:jtds:sqlserver driver seems to work with sql server.

thanks
A SQL Server JDBC driver that recognises jdbc:sqlserver is not open source or freely redistributable. Only open source or redistributable JDBC drivers supporting oracle.jdbc.OracleDriver, org.postgresql.Driver, net.sourceforge.jtds.jdbc.Driver, or org.mariadb.jdbc.Driver -- per the error message -- are available by default. I'm working on a mechanism to load arbitrary JDBC drivers, but it's non-trivial as the Eclipse framework (which is used to implement Rel) complicates loading arbitrary JARs, such as those used to provide JDBC drivers.

Post Reply