I´ve made a test with your library using the same Northwind-Database like in my Testproject getting the employees.
mariadb 355ms
msmysql: MySQL_QueryResult(Columns 19, Records 9,218ms,Employees
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
MySQLConnection.Initialize(MYSQLIP,MYSQLDBNAME,MYSQLUSER, MySQLPASS,MYSQLPORT)
End If
'ExecQuery all result values returned as strings
catgCount = 0
empsCount = 0
catgTmStart =DateTime.Now
MySQLConnection.ExecQuery("catg","select * from categories")
empsTmStart = DateTime.Now
MySQLConnection.ExecQuery("emps","select * from employees")
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub emps_update(emp As Map)
empsCount = empsCount + 1
If empsCount = 1 Then
Log("Employees start display In " & (DateTime.Now - empsTmStart) & "ms")
End If
End Sub
Sub emps_complete(finished As Boolean)
Log("Employees: " & empsCount & " Records In " & (DateTime.Now - empsTmStart) & "ms")
End Sub
Sub catg_update(catg As Map)
catgCount = catgCount + 1
If catgCount = 1 Then
Log("Categories start display In " & (DateTime.Now - empsTmStart) & "ms")
End If
End Sub
Sub catg_complete(finished As Boolean)
Log("Categories: " & catgCount & " Records In " & (DateTime.Now - catgTmStart) & "ms")
End Sub
Sub query_error(trace As String)
Log(trace)
End Sub
Sub catg_error( Trace As String )
End Sub
Sub emps_error( Trace As String )
End Sub
How to insert blob (image) using this library? Tnx...
public class InsertPictureToMySql {
public static void main(String[] args) throws Exception, IOException, SQLException {
Class.forName("org.gjt.mm.mysql.Driver");
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/databaseName", "root", "root");
String INSERT_PICTURE = "insert into MyPictures(id, name, photo) values (?, ?, ?)";
FileInputStream fis = null;
PreparedStatement ps = null;
try {
conn.setAutoCommit(false);
File file = new File("myPhoto.png");
fis = new FileInputStream(file);
ps = conn.prepareStatement(INSERT_PICTURE);
ps.setString(1, "001");
ps.setString(2, "name");
ps.setBinaryStream(3, fis, (int) file.length());
ps.executeUpdate();
conn.commit();
} finally {
ps.close();
fis.close();
}
}
}
I now believe that this person is actually trying to pick a fight with you and is deliberately looking to argue with you Manfred, just ignore them as I am. Your library does exactly what it says it will do and that's all that really matters. At least you answer questions about your libraries (thinking about it, you answer questions about other developers libraries too). He or she has not even answered a simple question from December 5th about their own MySQL library, they have some nerve. Now that's ignorance to the maximum, considering how much interaction he or she is having with yourself about your library. They go around other MySQL library promoting their own library and then not answering questions about it, give it a rest.
It's now time to try a new 3D trick with my 450 heli, if I crash it I don't really care as it's only my practice heli and not my main carbon fibre heli
Hello @BarryW, I personally convert an images into a Base64 string then I save the data into the database field. When I want to view the Image in the database field, I just read the string out of the database field and then use Base64 to convert the string back into a viewable image again into an ImageView. You can use my base64 encode/decode image converter library to convert your images to a Base64 string and back to an image again. Here is my library https://www.b4x.com/android/forum/threads/base64-encode-decode-image-library.31031/#content.
Item image is being held in the database. Top right image below is about 5k in size...
@BarryW all the libraries read BLOBS. I've just given you the way that I do it, it works perfect for me. You do not have to do it my way, good luck.
Maybe this library developer can help you out with your enquiry.
How to check the connection in Android not in B4a Logs . . .
Dim Server As ServerSocket
Server.Initialize(0, Null)
If Server.GetMyIP = "127.0.0.1" Then 'Test for internet connection
'There is no internet
Else
'There is internet
End If
You need to select Network in the library tab.
B4X:Dim Server As ServerSocket Server.Initialize(0, Null) If Server.GetMyIP = "127.0.0.1" Then 'Test for internet connection 'There is no internet Else 'There is internet End If
Sub MySQL_QueryResult2(data As List, meta As Map)
Sub sql_QueryResult2(data As List, meta As Map)
Can you please tell me your name under you register the lib? I get no reference to "hotspring" in my registrations!?THX This was my error
It would be stupid that someone shared or decompiled your lib... it's a recipe for losing many of great library coders here ...Can you please tell me your name under you register the lib? I get no reference to "hotspring" in my registrations!?
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?