A small example that lets you load a SQLite database and see its contents. The program tries to load BLOB fields as images.
Updated file is attached to post #4.
Last edited:
Hi All,Here's the fixed version that works with beta 6.
Sub InsertBlob(blobname As String)
Log("SQL Insert BLOB :: Start")
If File.Exists(File.DirApp, blobname) = False Then
Log("BLOB File NOT Exists: " & File.DirApp & ", " & blobname)
Return
End If
Log("BLOB File Exists: " & File.DirApp & ", " & blobname)
'convert the image file to a bytes array
Dim InputStream1 As InputStream
InputStream1 = File.OpenInput(File.DirApp, blobname)
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
Log("SQL Insert ...")
SQL.ExecNonQuery2("INSERT INTO images VALUES(NULL, ?, ?)", Array As Object(blobname, Buffer))
Log("SQL Insert BLOB :: End")
End Sub
java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
Program started.
main._process_globals (java line: 143)
java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
at b4j.example.main._process_globals(main.java:143)
at b4j.example.main.initializeProcessGlobals(main.java:131)
at b4j.example.main.start(main.java:33)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(LauncherImpl.java:821)
at com.sun.javafx.application.LauncherImpl$$Lambda$51/1996990761.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(PlatformImpl.java:323)
at com.sun.javafx.application.PlatformImpl$$Lambda$45/1349277854.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/851662109.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/1147985808.run(Unknown Source)
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$141(WinApplication.java:102)
at com.sun.glass.ui.win.WinApplication$$Lambda$37/728890494.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: javafx.scene.control.Dialog
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
Yes.Should i upgrade?