aspose file tools*
The moose likes JDBC and the fly likes java.sql.SQLException: Non supported SQL92 token at position: 377: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: Non supported SQL92 token at position: 377: " Watch "java.sql.SQLException: Non supported SQL92 token at position: 377: " New topic
Author

java.sql.SQLException: Non supported SQL92 token at position: 377:

sachin kataria
Ranch Hand

Joined: Mar 27, 2006
Posts: 45
hi,
i have to create oracle-java source from java program. my code is :

( In Java which create java source in oracle)

strQuery = "CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED
\"ASCOMPONENT\" AS ";
strQuery += "import javax.xml.parsers.DocumentBuilderFactory; ";
strQuery += "import javax.xml.parsers.DocumentBuilder; ";
strQuery += "import org.xml.sax.SAXException; ";
strQuery += "import org.xml.sax.SAXParseException; ";
strQuery += "import org.w3c.dom.Document; ";
strQuery += "import org.w3c.dom.*; ";
strQuery += "import java.io.*; ";
strQuery += "import oracle.jdbc.driver.*; ";
strQuery += "import java.sql.*; ";
strQuery += "public class ASComponent ";
strQuery += "\n ";
strQuery += "{ "; // error here.../
strQuery += "\n ";
strQuery += "public static void readXML(String strXML,String
strTable) ";
strQuery += "\n ";
strQuery += "{ ";
strQuery += "\n ";
strQuery += " } ";
strQuery += "\n ";
strQuery += " } ";
strQuery += "\n ";


System.out.println("Query = " + strQuery[i]);

stmt.executeQuery(strQuery);

i am getting error :

java.sql.SQLException: Non supported SQL92 token at position: 377:

so, what is that error ?
i think when it is getting '{ ' it is giving error...?
how we can use token '{}' in jdbc.

so, what is the error..?
please help me its urgent..

Thanks in advance...
bart zagers
Ranch Hand

Joined: Feb 05, 2003
Posts: 234
Just a guess, is '\n' just above the problem allowed and recognised?
Why do you start using them on that line? You put all the import statements after each other and then start formatting with newlines?
sachin kataria
Ranch Hand

Joined: Mar 27, 2006
Posts: 45
i also remove '\n' but same error....
B.J. Reed
Greenhorn

Joined: Feb 18, 2009
Posts: 1
Hi, was a fix or workaround ever found for this problem? I am having the same problem with the { when I try the same kind of thing.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi B.J and welcome to Javaranch!

We try not to wake up old threads here, can you post your specific problem as a new thread please?

Thanks


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.sql.SQLException: Non supported SQL92 token at position: 377: