• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

SQLJ in Netbeans

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And read also TellTheDetails
 
Kashinath Roy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 76395
364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to resole the issue,

Any way to overcome the problem

so that i can use sqlj in netbeans
 
Campbell Ritchie
Marshal
Posts: 76395
364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tell us which line number is causing the problem. Compile the code and tell us the error message.
 
Kashinath Roy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Marshal
Posts: 76395
364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've already told you the #sql bit looks incorrect.
 
Kashinath Roy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply

But I am looking for solution not the problem

any body knows the solution of the above mentioned problem .
 
Get me the mayor's office! I need to tell him about this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic