Android Question MySql Error Help

Django Helery Marques

Member
Licensed User
Longtime User
what causes this error ?


btnbuscar_click (java line: 430)

Dim rs1 as ResultSet

rs1 = mh1.Query("select cli.cli_codigo,cli.cli_descricao from cli cli")

java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet
at b4a.example.main._btnbuscar_click(main.java:430)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:153)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9080)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
java.lang.ClassCastException: com.mysql.jdbc.JDBC4ResultSet
 

DonManfred

Expert
Licensed User
Longtime User
You need to post the full code. With this snippet it can not work so i guess you forgoet to post relevant code
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you have a double table name in your query.

you also don't need to prefix the table name to the selected fields when you don't have joins.
 
Upvote 0

apiwatcomscith

Member
Licensed User
Longtime User
best way try to run query "select cli.cli_codigo,cli.cli_descricao from cli cli"
in database manager for test
you can get real error. i think so
 
Upvote 0
Top