Questions tagged [sqlj]

SQLJ is an outdated ISO standard for embedding SQL instructions in Java programs.

Instead of JDBC, SQLJ is not an API but an extension to the Java language. So SQLJ programs must be preprocessed (by a SQLJ translator) before being compiled.

36 questions
1
vote
2 answers

How to print on Oracle SQL Developer console using SQLJ

I created and launch the SQLJ Java procedure (using SQL Developer). I have some bugs and I would like to debug Java source code. What is the best way to do this? Is it possible to print to the SQL Developer console some information using System.out?
Michał Ziober
  • 37,175
  • 18
  • 99
  • 146
1
vote
2 answers

compiling SQLJ with Ant

How to compile SQLJ with ant?
IAdapter
  • 62,595
  • 73
  • 179
  • 242
0
votes
5 answers

Where do you get the sqlj libaries for java?

I've been charged with writing a DB manipulator with java for a project. My professor gives us material that says to use the sqlj library (Oracle I'm assuming?), but nobody explains where it comes from or how do download it. I've been looking for…
AIngellis
  • 13
  • 2
  • 6
0
votes
0 answers

Resolve Error : #sql is an illegal character

I am trying to write a SQLJ application program to access Db2 data but I am facing some errors while creating the context for the connection as per the IBM manual. I am receiving errors for the lines that starts with #sql. #sql context…
0
votes
0 answers

Compile Error: Package sqlj.runtime does not exist

I am trying to do a homework assignment in a database course that requires me to use sqlj. It is supposed to make a connection to a SQL database running on my computer. When copying and pasting the example code into Netbeans I get a compile…
Alex
  • 1
  • 1
0
votes
1 answer

sqlj runtime error

Could somebody tell me what is causing this error when using sqlj in Oracle 11g. I am using Solaris 8 and I have tried changing JDK versions (tried both 1.5 and 1.6). bash-2.03$ ~/11.2.0.2/bin/sqlj -compile=false -classpath…
Raj
  • 708
  • 3
  • 10
  • 21
0
votes
1 answer

SQLJ produced invalid Java code

although I an an old time user of the Website, but managed to resolve problems myself before. This time I need your advice :) The situation: I've inherited the old Java project code where SQLJ is used for database access. Neither Database nor SQLJ…
Bugagotti
  • 228
  • 2
  • 6
0
votes
2 answers

Is there any Gradle -Sqlj plugin available to do sqlj translation as we do using maven sqlj plugin?

I had converted my maven build project to gradle and now one of the plugins that we use in maven is SQLj plugin. The sqlj plugin has additional configuration that takes the source (.sqlj) files from specific folder path and then compiles them to…
rinilnath
  • 136
  • 2
  • 15
0
votes
0 answers

insert excel file into oracle 11g blob field with sqlj

I have the following problem. In oracle java I create an excel file, then i want to store it in a blob field. When I try to insert into the table i get a java.lang.ClassCastException: Error SQL: ORA-29532: llamada Java terminada por una excepción…
Szil
  • 55
  • 9
0
votes
1 answer

Closing OPEN-RECURSIVE and DICTIONARY LOOKUP CURSOR CACHED cursors through an SQLJ file

We have an SQLJ file where we specified an iterator to fetch multiple records from a table. Currently we are trying to upload 300 records from an intermediate table to the actual table by fetching 50 records out of the total 300 records at a…
Uma
  • 50
  • 2
  • 11
0
votes
0 answers

How to create an iterator for an aliased projection of select?

When you have a query like this: select A,B from MYTABLE where C='1' you just declare the following: #sql iterator Cursor(String A, String B); But what if you have a query like this one? select T1.A, T1.B from MYTABLE T1 where C='1'
Phate
  • 6,066
  • 15
  • 73
  • 138
0
votes
0 answers

What is the easiest way to execute an SQLJ file?

How to run this file? SQLJ-file : import java.sql.*; import sqlj.runtime.ref.*; public class tes { public static void main(String[] args) throws SQLException { Oracle.connect ("jdbc:oracle:thin:@oow11:5521:sol2",…
Taha
  • 1,072
  • 2
  • 16
  • 29
0
votes
0 answers

JAVA implementation SQLJ Stored Procedure using DB2 for IBM i (AS400)

I tried to create a stored procedure in SQLJ using IBM data studio and able to create the three types of files on building as xxx.class, xxx_Profile0.ser and xxx_ProfileKeys.class and placed the (.class) files in the below directory…
Anto
  • 57
  • 2
  • 10
0
votes
3 answers

SQLJ VS JAVA files

Can anyone expalain difference between .sqlj and .java files?
Debuger
  • 9
  • 2
0
votes
0 answers

Java Client doesn't get ResultSet from Stored Procedure (written in Java - SQLJ) on DB2 zOS

I'm trying to recieve a ResultSet from a SQLJ Java Stored Procedure. The Client doesn't get the ResultSet. So I don't know if there is anything wrong with my create, transfer or receive of the ResultSet. This is how I create the Procedure: …
Sebastian
  • 21
  • 2