aspose file tools*
The moose likes Java in General and the fly likes SQLJ  in Netbeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "SQLJ  in Netbeans" Watch "SQLJ  in Netbeans" New topic
Author

SQLJ in Netbeans

Kashinath Roy
Greenhorn

Joined: Apr 21, 2009
Posts: 9
How to Run SQLJ in NetBeans

Code Working fine in Notepad and Command Prompt.

But not working in netbens ,

What are the steps to run SQJL in NetBeans ( Using DB2)
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

And read also TellTheDetails
Kashinath Roy
Greenhorn

Joined: Apr 21, 2009
Posts: 9
My Code for sqlj is something like this



This code working nice in Command Prompt with Notepad.


But while trying to execute it on NetBeans IDE it is returning an error


Exception in thread "main" java.lang.RuntimeException: Uncompilable source code
at jdbc_demo.Sample.getFName(Sample.java:33)
at jdbc_demo.Sample.main(Sample.java:47)
Java Result: 1
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40064
    
  28
Please always use the code button; since you are new, I have edited your post and you can see how much better it looks.
That error from NetBeans is very unhelpful, unless it means the line beginning #sql (which isn't legal Java™ or any description). The line numbers appear to be different from what NetBeans is using.
Kashinath Roy
Greenhorn

Joined: Apr 21, 2009
Posts: 9
How to resole the issue,

Any way to overcome the problem

so that i can use sqlj in netbeans
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40064
    
  28
Tell us which line number is causing the problem. Compile the code and tell us the error message.
Kashinath Roy
Greenhorn

Joined: Apr 21, 2009
Posts: 9
Line 31

#sql{ SELECT name into :first_name FROM staff WHERE id=:eid};

Error Message in NetBeans

Exception in thread "main" java.lang.RuntimeException: Uncompilable source code
at jdbc_demo.Sample.getFName(Sample.java:31)
at jdbc_demo.Sample.main(Sample.java:42)
Java Result: 1
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40064
    
  28
I've already told you the #sql bit looks incorrect.
Kashinath Roy
Greenhorn

Joined: Apr 21, 2009
Posts: 9
Thank you for your reply

But I am looking for solution not the problem

any body knows the solution of the above mentioned problem .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SQLJ in Netbeans