ADORecordset & ADOConnection Library for MySQL

Sytek

Active Member
Licensed User
Longtime User
Strange, my code does not insert records in the database ...

B4X:
   AdoConn.ConnectionString(TxtServer,"3306","UTF-8",DataBaseOpen,"bebi","123456")
   AdoConn.ConnectionTimeout=1
   AdoConn.LoginTimeout=1
   AdoConn.SocketTimeout=1
   AdoConn.InitializeEvent 
   AdoConn.Open
   AdoRec.InitializeEvent
   AdoRec.Connection=AdoConn
   AdoRec.SqlStatement="INSERT INTO usuarios(usuario_emailgoogle) VALUES ('[email protected]');"
   AdoRec.Open         
   AdoRec.Update
what could be wrong?

Use Instead...
B4X:
AdoConn.Execute="INSERT INTO usuarios(usuario_emailgoogle) VALUES ("&"'[email protected]')"
..It Works for me
Hope This Helps
 

Sytek

Active Member
Licensed User
Longtime User
Verify if server is running

I am waiting your feedback

Hi Avacondios Hope you're just fine!
Here's my feedback

I'd made some tests with your Lib; I have no problems with it; Works just fine, just one thing if I Stop the Service on the Server Side and try to Access with your Lib.

B4X:
'Replace the values, with your Mysql Server properties
AdoConn.ConnectionString("192.168.43.111","3306","UTF-","demo","demo","demo")
AdoConn.ConnectionTimeout=1
AdoConn.LoginTimeout=1
AdoConn.SocketTimeout=1
   
'if the mysql driver return error, the subs AdoConnectionError will activate
AdoConn.InitializeEvent 
AdoConn.Open
...My problem is here at the Adoconn.Open
The adoconnection sub error Never shows up
B4X:
Sub AdoConnectionError (Message As String, State As String, ErrorCode As Int)
Log("AdoConnectionError : " & CRLF & "Error message : " & Message & CRLF & "State : " & State & CRLF & "Error code : " & ErrorCode)
End Sub

Sub AdoRecordsetError (Message As String, State As String, ErrorCode As Int)
Log("AdoRecordsetError : " & CRLF & "Error message : " & Message & CRLF & "State : " & State & CRLF & "Error code : " & ErrorCode)
End Sub

..I'm doing this 'cause in case that the server goes down I need to verify if the device reaches the server.

How can i solve this one?

Thank's in advance!
Regards!

EDIT: I will try this. http://www.b4x.com/forum/basic4android-updates-questions/28875-how-do-serversocket-look-up-ip-address-connected-client.html#post167644
, but it would be nice if the lib check this one
 
Last edited:

laguilar

Member
Licensed User
Longtime User
API Issue

Has anyone figured out why most of the mysql libraries on the website do not work with API 10 or higher? This has become a rather annoying issue. Here is my manifest...


This does not work
B4X:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10" android:maxSdkVersion="17" />

but this does...
B4X:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="9" android:maxSdkVersion="17" />

by setting targetSdkVersion="8" it works well but for some reason when i have the minSdkVersion and targetSdkVersion = 8 then on the google play store it says my 10" and 7" tablets are not compatible.

our application is intended for all devices but looks best in a tablet so this really creates an issue with the play store saying our app is incompatible with tablets.
 
Last edited:

slydog43

Member
Licensed User
Longtime User
how to upgrade lib

How to I update the lib to use latest MySQL connector

mysql-connector-java-5.1.25-bin. I tried renaming the new 5.1.25 to the 5.1.22, and my program compiles, but that is not the correct way.
 

Sytek

Active Member
Licensed User
Longtime User
Feedback
The library work's just fine. Just one thing.
This property:
6.SocketTimeout - Gets or set a timeout (in seconds) on network socket operations (0, the default means
no timeout), before throwing an error.
If I change the value to 1 or 2 and Disconnect(for possible errors of communication) the server and then the app try to reach the server the SocketTimeout property library have a 3 Minutes timeout internally.
I mean the value assigned to SocketTimeout does not change.

Thank's for your Help.
Best Regards!
 
Last edited:

Ernst Gruber

New Member
Licensed User
Longtime User
My problem is :

The Library works fine in debug mode. It connects properly and there is no problem.
But if I generate a release, then there is no way to get connected to my database.

Thank you for helping.
 

Ernst Gruber

New Member
Licensed User
Longtime User
Hi Erel

Thank you for your quick reply. Unfortunately it has not solved my problem.
I connect my device (galaxyIII) via b4aBridge. Running a debug(rapid) version
everything is ok. Running the release i get the message State: 08001, Errorcode: 0.
Excuse my inexperiance, but could it be because the debug version is running
slower?
 

swarupsengupto

Member
Licensed User
Longtime User
My app when it tries to connect to mysql database it takes a long time (about 2 to 3sec) which slows the app performance. What should I do.
Is there is a way to connect to mysql at a faster speed?
 
Top