SQL1.ExecNonQuery2("INSERT INTO table2 VALUES('smiley', ?)", Array As Object(Buffer))
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "yelloe icone empty - copy.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database at position "img3"
SQL1.ExecNonQuery2("INSERT INTO table2 (id, img3) VALUES ('1',?)", Arry as Object(Buffer))
SQL1.ExecNonQuery2("UPDATE table2 SET img3 = ? WHERE id = 1", Arry as Object(Buffer))
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
Sub LoadPartnersIcons
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner1img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte
Buffer = Cursor1.GetBlob("partner1img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner1.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner2img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte
Buffer = Cursor1.GetBlob("partner2img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length) ' I get the error here
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner2.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner3img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte 'declare an empty byte array
Buffer = Cursor1.GetBlob("partner3img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner3.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner4img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte 'declare an empty byte array
Buffer = Cursor1.GetBlob("partner4img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner4.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner5img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte 'declare an empty byte array
Buffer = Cursor1.GetBlob("partner5img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner5.SetBackgroundImage(Bitmap1)
Cursor1.Close
End Sub
Sub LoadPartnersDummy
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "yelloe icone empty - copy.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner1img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "greyicon empty.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner2img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "green icon empty.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner3img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "yelloe icone empty - copy.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner4img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "rediconempty - copy.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner5img) VALUES ('1',?)", Array As Object(Buffer))
End Sub
** Service (starter) Create **
JAVA [Initialize] eventname = objWFI
[isConnectedToInternet]true
** Service (starter) Start **
[objWFI_onInitialized]
Ping Host:197.189.232.202
Ping:0
Network WIFI connected
WifiAvailable:true
WifiConnected:true
Ping Host:197.189.232.202
Ping:0
MobileAvailable:true
BroadcastReceiver::onReceive::android.net.conn.CONNECTIVITY_CHANGE
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (playsplash) Create, isFirst = true **
** Activity (playsplash) Resume **
Playing completed
---- AppUpdating.ReadCurVN
Current Version: 1.01
Unexpected event (missing RaiseSynchronousEvents): update_updatecomplete
Check the unfiltered logs for the full stack trace.
---- AppUpdating.ReadWebVN
** Activity (playsplash) Pause, UserClosed = false **
** Activity (menu) Create, isFirst = true **
Error occurred on line: 84 (Menu)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at anywheresoftware.b4a.shell.Shell.getCorrectClassName(Shell.java:589)
at anywheresoftware.b4a.shell.Shell.getField(Shell.java:668)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:349)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:259)
at com.rob.ebuki.menu._loadpartnersicons(menu.java:402)
at com.rob.ebuki.menu._activity_create(menu.java:390)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:703)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:340)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:247)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at com.rob.ebuki.menu.afterFirstLayout(menu.java:102)
at com.rob.ebuki.menu.access$000(menu.java:17)
at com.rob.ebuki.menu$WaitForLayout.run(menu.java:80)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5637)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
** Activity (menu) Resume **
Sub LOCALCreatePartnersTable
Dim m As Map
m.Initialize 'clear the map
m.Put("id", DBUtils.DB_TEXT)
m.Put("partner1img", DBUtils.DB_BLOB)
m.Put("partner2img", DBUtils.DB_BLOB)
m.Put("partner3img", DBUtils.DB_BLOB)
m.Put("partner4img", DBUtils.DB_BLOB)
m.Put("partner5img", DBUtils.DB_BLOB)
DBUtils.CreateTable(Starter.SQL0, "partners", m, "")
ToastMessageShow("Partners Table Created", False)
LoadPartnersDummy
End Sub
Sub LoadPartnersDummy
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "yelloe icone empty - copy.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner1img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "greyicon empty.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner2img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "green icon empty.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner3img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "yelloe icone empty - copy.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner4img) VALUES ('1',?)", Array As Object(Buffer))
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "rediconempty - copy.png")
Dim OutputStream1 As OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(InputStream1, OutputStream1)
Dim Buffer() As Byte 'declares an empty array
Buffer = OutputStream1.ToBytesArray
'write the image to the database
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner5img) VALUES ('1',?)", Array As Object(Buffer))
End Sub
Sub LoadPartnersIcons
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner1img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte
Buffer = Cursor1.GetBlob("partner1img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner1.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner2img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte
Buffer = Cursor1.GetBlob("partner2img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length) ' I get the error here
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner2.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner3img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte 'declare an empty byte array
Buffer = Cursor1.GetBlob("partner3img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner3.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner4img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte 'declare an empty byte array
Buffer = Cursor1.GetBlob("partner4img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner4.SetBackgroundImage(Bitmap1)
Cursor1.Close
Dim Cursor1 As Cursor
Cursor1 = Starter.SQL0.ExecQuery("SELECT partner5img FROM partners")
Cursor1.Position = 0
Dim Buffer() As Byte 'declare an empty byte array
Buffer = Cursor1.GetBlob("partner5img")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
imgPartner5.SetBackgroundImage(Bitmap1)
Cursor1.Close
End Sub
Sub LoadPartnersDummy
dim buffer1(), buffer2(), buffer3(), buffer4(), buffer5() as byte
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirAssets, "yelloe icone empty - copy.png")
buffer1() = CreateBuffer(inputStream1)
InputStream1 = File.OpenInput(File.DirAssets, "greyicon empty.png")
buffer2() = CreateBuffer(inputStream1)
InputStream1 = File.OpenInput(File.DirAssets, "green icon empty.png")
buffer3() = CreateBuffer(inputStream1)
InputStream1 = File.OpenInput(File.DirAssets, "yelloe icone empty - copy.png")
buffer4() = CreateBuffer(inputStream1)
InputStream1 = File.OpenInput(File.DirAssets, "rediconempty - copy.png")
buffer5() = CreateBuffer(inputStream1)
Starter.SQL0.ExecNonQuery2("INSERT INTO partners (id, partner1img, partner2img, partner3img, partner4img, partner5img) VALUES ('1',?,?,?,?,?)", Array As Object(Buffer1, Buffer2, Buffer3, Buffer4, Buffer5))
end Sub
Sub CreateBuffer(input as InputStream) as Buffer()
Dim Output as OutputStream
OutputStream1.InitializeToBytesArray(1000)
File.Copy2(input, Output)
Dim Buffer() As Byte 'declares an empty array
Buffer = Output.ToBytesArray
return Buffer()
end sub
Error description: Unknown type: buffer
Are you missing a library reference?
Sub CreateBuffer(input As InputStream) As Buffer()
Sub CreateBuffer(input As InputStream) As Buffer()
Dim Output As OutputStream
input.InitializeToBytesArray(1000)
File.Copy2(input, Output)
Dim Buffer() As Byte 'declares an empty array
Buffer = Output.ToBytesArray
Return Buffer()
End Sub
Dim InputStream1 As InputStream
buffer1() = CreateBuffer(InputStream1)
Error compiling program.
Error description: Unknown member: initializetobytesarray
Occurred on line: 530
input.InitializeToBytesArray(1000)
Word: initializetobytesarray
input.InitializeToBytesArray(1000)
java.lang.NumberFormatException: Invalid double: "null"
If result.Tag = "get_partners" Then
ProgressDialogHide
For Each records() As Object In result.Rows
Dim buffer1(), buffer2(), buffer3(), buffer4(), buffer5() As Byte
Dim InputStream1 As InputStream
InputStream1 = records(result.Columns.Get("partner1img")) <-- ERROR
buffer1 = CreateBuffer(InputStream1)
InputStream1 = records(result.Columns.Get("partner2img"))
buffer2 = CreateBuffer(InputStream1)
InputStream1 = records(result.Columns.Get("partner3img"))
buffer3 = CreateBuffer(InputStream1)
InputStream1 = records(result.Columns.Get("partner4img"))
buffer4 = CreateBuffer(InputStream1)
InputStream1 = records(result.Columns.Get("partner5img"))
buffer5 = CreateBuffer(InputStream1)
Starter.SQL0.ExecNonQuery2("UPDATE partners SET id = ?, SET partner1img = ?, SET partner2img = ?, SET partner3img = ?, SET partner4img = ?, SET partner5img = ? WHERE id = 1 VALUES ('1',?,?,?,?,?)", Array As Object(buffer1, buffer2, buffer3, buffer4, buffer5))
Next
End If
Sub CreateBuffer(input As InputStream) As Byte()
Dim Output As OutputStream
Output.InitializeToBytesArray(1000)
File.Copy2(input, Output)
Dim Buffer() As Byte 'declares an empty array
Buffer = Output.ToBytesArray
Return Buffer
End Sub
HandleJob: 14
Tag: get_partners, Columns: 6, Rows: 1
id partner1image partner2image partner3image partner4image partner5image
1 [B@1cbdb9a6 [B@7bccfe7 [B@6671794 [B@338c523d [B@bfbca32
Error occurred on line: 150 (Registration)
java.lang.NumberFormatException: Invalid double: "null"
If result.Tag = "get_partners" Then
ProgressDialogHide
For Each records() As Object In result.Rows
Dim buffer1(), buffer2(), buffer3(), buffer4(), buffer5() As Byte
buffer1 = records(1)
buffer2 = records(2)
buffer3 = records(3)
buffer4 = records(4)
buffer5 = records(5)
Starter.SQL0.ExecNonQuery2("UPDATE partners SET partner1img = ?,partner2img = ?,partner3img = ?,partner4img = ?,partner5img = ? WHERE id = 1", Array As Object(buffer1, buffer2, buffer3, buffer4, buffer5))
Next
End If
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?