Erel I have been busy all day to get a good connection to my server made some changes, as far as I can see it must work, I now test it and get this error
>>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
CheckJNI is ON
--- registering native functions ---
GC_EXPLICIT freed 282 objects / 18208 bytes in 126ms
Scanning package: /data/app/vmdl32207.tmp
Removing non-system package:anywheresoftware.b4a.samples.mysql
Force stopping package anywheresoftware.b4a.samples.mysql uid=10035
Scanning package anywheresoftware.b4a.samples.mysql
Package anywheresoftware.b4a.samples.mysql codePath changed from /data/app/anywheresoftware.b4a.samples.mysql-2.apk to /data/app/anywheresoftware.b4a.samples.mysql-1.apk; Retaining data and using new
/data/app/anywheresoftware.b4a.samples.mysql-1.apk changed; unpacking
DexInv: --- BEGIN '/data/app/anywheresoftware.b4a.samples.mysql-1.apk' ---
DexOpt: load 99ms, verify 391ms, opt 11ms
DexInv: --- END '/data/app/anywheresoftware.b4a.samples.mysql-1.apk' (success) ---
Code path for pkg : anywheresoftware.b4a.samples.mysql changing from /data/app/anywheresoftware.b4a.samples.mysql-2.apk to /data/app/anywheresoftware.b4a.samples.mysql-1.apk
Resource path for pkg : anywheresoftware.b4a.samples.mysql changing from /data/app/anywheresoftware.b4a.samples.mysql-2.apk to /data/app/anywheresoftware.b4a.samples.mysql-1.apk
Activities: anywheresoftware.b4a.samples.mysql.main
Force stopping package anywheresoftware.b4a.samples.mysql uid=10035
move /data/dalvik-cache/data@
[email protected]@classes.dex -> /data/dalvik-cache/data@
[email protected]@classes.dex
New package installed in /data/app/anywheresoftware.b4a.samples.mysql-1.apk
Force stopping package anywheresoftware.b4a.samples.mysql uid=10035
GC_EXPLICIT freed 7500 objects / 519184 bytes in 167ms
no available voice recognition services found
GC_EXPLICIT freed 596 objects / 34112 bytes in 284ms
GC_EXPLICIT freed 3248 objects / 185576 bytes in 99ms
unlink /data/dalvik-cache/data@
[email protected]@classes.dex
Shutting down VM
adbd disconnected
NOTE: attach of thread 'Binder Thread #3' failed
>>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
CheckJNI is ON
--- registering native functions ---
Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=anywheresoftware.b4a.samples.mysql/.main }
Start proc anywheresoftware.b4a.samples.mysql for activity anywheresoftware.b4a.samples.mysql/.main: pid=346 uid=10035 gids={3003}
Shutting down VM
adbd disconnected
NOTE: attach of thread 'Binder Thread #3' failed
** Activity (main) Create, isFirst = true **
GC_FOR_MALLOC freed 7551 objects / 370456 bytes in 80ms
** Activity (main) Resume **
Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@43fa6a08 (uid=10035 pid=346)
Client not active, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43fb83e0
Displayed activity anywheresoftware.b4a.samples.mysql/.main: 1942 ms (total 1942 ms)
GC_FOR_MALLOC freed 5570 objects / 307112 bytes in 233ms
Response from server: <?
$databasename = "wonen";
// Server in the this format: <computer>\<instance name> or
// <server>,<port> when using a non default port number
$server = 'iptoserver';
// Connect to MSSQL
$link = mssql_connect($server, 'name', 'psswrd');
if (!$link) {
die('Something went wrong while connecting to MSSQL');
}
mssql_select_db($databasename) or die(mysql_error());
$query = file_get_contents("php://input");
$sth = mysql_query($query);
if (mysql_errno()) {
header("HTTP/1.1 500 Internal Server Error");
echo $query.'\n';
echo mysql_error();
}
else
{
$rows = array();
while($r = mysql_fetch_assoc($sth)) {
$rows[] = $r;
}
print json_encode($rows);
}
?>
main_hc_responsesuccess (B4A line: 63)
countries = parser.NextArray 'returns a list with maps
java.lang.RuntimeException: JSON Array expected.
at anywheresoftware.b4a.objects.collections.JSONParser.NextArray(JSONParser.java:59)
at anywheresoftware.b4a.samples.mysql.main._hc_responsesuccess(main.java:306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:99)
at anywheresoftware.b4a.BA$1.run(BA.java:202)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: JSON Array expected.