hi there... friends will anyone could help me with this error ??
Program started.
Error occurred on line: 51 (codproveedores).
java.lang.NullPointerException
at b4j.example.codproveedores._gridproveedor_selectedrowchanged(codproveedores.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:563)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:221)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:82)
at anywheresoftware.b4a.BA$2.run(BA.java:165)
at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$149(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
this is my code:
MySQL.SQLCon.ExecNonQuery ("UPDATE `proveedor` SET `Proveedor`='" & TextField1.Text & "',`CedJuridica`='" & TextField2.Text & "',`CuentaB`='" & TextField3.Text & "',`tel1`='" & TextField4.Text & "',`tel2`='" & TextField5.Text & "',`Mail`='" & TextField6.Text & "',`Web`='" & TextField7.Text & "',`Plazo`='" & TextField8.Text & "' WHERE id='" & IdProveedor & "'")
rsProveedor=MySQL.SQLCon.ExecQuery("SELECT * from proveedor where Empresa= '" & Main.Empresa & "'")
GridProveedor.SetColumns(Array As String("Proveedor","Ced Juridica","Cta bancaria", "Telefono","Telefono2","Mail","Web","Plazo","Id"))
Do While rsProveedor.NextRow
Dim row(9) As Object
row(0) = rsProveedor.GetString("Proveedor")
row(1) = rsProveedor.GetString("CedJuridica")
row(2) = rsProveedor.GetString("CuentaB")
row(3) = rsProveedor.GetString("tel1")
row(4) = rsProveedor.GetString("tel2")
row(5) = rsProveedor.GetString("Mail")
row(6) = rsProveedor.GetString("Web")
row(7) = rsProveedor.GetString("Plazo")
row(8) = rsProveedor.GetString("Id")
GridProveedor.Items.Add(row)
Loop
rsProveedor.Close
GridProveedor.SetColumnWidth(0,500)
Toast.ToastShow("El registro fue editado satisfactoriamente")
Program started.
Error occurred on line: 51 (codproveedores).
java.lang.NullPointerException
at b4j.example.codproveedores._gridproveedor_selectedrowchanged(codproveedores.java:395)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:563)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:221)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:156)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:82)
at anywheresoftware.b4a.BA$2.run(BA.java:165)
at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$149(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
this is my code:
MySQL.SQLCon.ExecNonQuery ("UPDATE `proveedor` SET `Proveedor`='" & TextField1.Text & "',`CedJuridica`='" & TextField2.Text & "',`CuentaB`='" & TextField3.Text & "',`tel1`='" & TextField4.Text & "',`tel2`='" & TextField5.Text & "',`Mail`='" & TextField6.Text & "',`Web`='" & TextField7.Text & "',`Plazo`='" & TextField8.Text & "' WHERE id='" & IdProveedor & "'")
rsProveedor=MySQL.SQLCon.ExecQuery("SELECT * from proveedor where Empresa= '" & Main.Empresa & "'")
GridProveedor.SetColumns(Array As String("Proveedor","Ced Juridica","Cta bancaria", "Telefono","Telefono2","Mail","Web","Plazo","Id"))
Do While rsProveedor.NextRow
Dim row(9) As Object
row(0) = rsProveedor.GetString("Proveedor")
row(1) = rsProveedor.GetString("CedJuridica")
row(2) = rsProveedor.GetString("CuentaB")
row(3) = rsProveedor.GetString("tel1")
row(4) = rsProveedor.GetString("tel2")
row(5) = rsProveedor.GetString("Mail")
row(6) = rsProveedor.GetString("Web")
row(7) = rsProveedor.GetString("Plazo")
row(8) = rsProveedor.GetString("Id")
GridProveedor.Items.Add(row)
Loop
rsProveedor.Close
GridProveedor.SetColumnWidth(0,500)
Toast.ToastShow("El registro fue editado satisfactoriamente")