开发者

can only use limited amount of methods on java sql

Is it normal that if you declare a method on a jFrameView. You can only use few methods from the java.sql package?I'm trying to create a preparedStatement so that I could perform an insert query but I only got these:

can only use limited amount of methods on java sql

Whereas if I use the connection object on a normal command line style java app. I get a bunch of methods available:

can only use limited amount of methods on java sql

They're all under the same folder(package) where the jFrame/Form is. And the package. Please help开发者_开发技巧, I can't understand why its acting this way.


The first conn is not been declared as java.sql.Connection. You've declared it as conc which seems to be some homegrown class. Fix it accordingly. If it is supposed to be some sort of a connection manager, then you should rewrite that class that it has a method which returns a fullworthy java.sql.Connection so that you can use it further in your code.

This basic tutorial should get you started with approaching JDBC the proper way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜