Android Question It works in debug mode, not in Release mode. SQL SERVER connection

Erlan Rospigliosi

Member
Licensed User
Longtime User
egards

MSSQL use the library, and my project I select, insert and update and everything works OK , but only when I run in Debug mode.
But fails when I compile in Release mode

Dim db As MSSQL
dim L as List
Dim str As String

db.setDatabase("x.x.x.x","MyDatabase","MyUsr","Mypwd")

L.Initialize
L = db.Query("Select * from myTable")

If Lx.IsInitialized= True Then
For i= 0 To Lx.Size-1
str = Lx.Get(i)
Msgbox (str ,"")
Next
Else
Return
End If


MSSQL.xml see now using the jtds - 1.2.5 for concetarse to SQL SERVER, now it will not be that jar file is not copied when compiling in release mode.

Now another thing I detect that when db.Query ( "Select * from myTable " ) I run in debug mode delivers data , but release delivery mode null .
 

Douglas Farias

Expert
Licensed User
Longtime User
Try add on manifest

AddPermission (android.permission.INTERNET)
AddPermission (android.permission.ACCESS_NETWORK_STATE)

if dont work try change
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4"/>
on manifest too
 
Upvote 0

Erlan Rospigliosi

Member
Licensed User
Longtime User
Try add on manifest



if dont work try change
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4"/>
on manifest too

Thank you Douglas Farias,
the manifest must be so


Use Library MSSQL

Dim db As MSSQL
Dim i As Int
Dim L As List
Dim Camp() As String
Dim str As String

db.setDatabase("192.X.X.X","Database","User","Pass")

L.Initialize
L = db.Query("Exec myStored_Listar Null, 1 ") //Call my stored procedure with 2 parameters

For i= 1 To L.Size-1
str = L.Get(i)
str = str.Replace("[","").Replace ("]","")
Camp = Regex.Split(",", str)
msgbox(camp(0) ,"Camp")
Next


The files I got from here:
https://www.b4x.com/android/forum/threads/mssql-with-jdbc-library-v1-00.22244/
 

Attachments

  • MSSQL.xml
    1.6 KB · Views: 255
  • MSSQL.jar
    10.1 KB · Views: 163
  • jtds-1.3.1.jar
    310.4 KB · Views: 144
  • jtds-1.2.5.jar
    295.2 KB · Views: 145
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…