Hello
After days Reading ALL Threads of the Forum and checking the Internet finaly i can connect to a MSSQL DB
But it is imposible to make a query and get a Result back
my code
Please can you provide the proper code, is NOT to make my job, i usesd all i could do
Please give me a help, searching the Forum or the Internet is done more then a few times.
With C, C#, VB, Delphi no problem, but V4A not working and i have no idea what i can do
thanks
Uli - Dataprotec
After days Reading ALL Threads of the Forum and checking the Internet finaly i can connect to a MSSQL DB
But it is imposible to make a query and get a Result back
my code
B4X:
#AdditionalJar: mysql-connector-java-5.1.34-bin.jar
Sub Process_Globals
Public msSQL As JdbcSQL
Private driver As String = "net.sourceforge.jtds.jdbc.Driver"
Private jdbcUrl As String = "jdbc:jtds:sqlserver://192.168.5.21:1433/DB_Datas"
Private Username As String = "user"
Private Password As String = "1234"
end sub
Sub cmdConnect_Click
msSQL.InitializeAsync("msSQL", driver, jdbcUrl, Username, Password)
Wait For msSQL_Ready (Success As Boolean)
If Success = True Then
Log("Connected") '***Get the message is connected
End If
Log(msSQL.IsInitialized) '****get the message is Initialized
'***** here i do NOT get any Error
Dim sf As Object = msSQL.ExecQuery("SELECT UserID, Name FROM UserInfo_Table WHERE UserID = '5'")
'***** But here it stucks and NO way to make it running, no Error Msg
Wait For (sf) msSQL_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
If Success Then
Do While Crsr.NextRow
Log($"Name: ${Crsr.GetInt("Name")}"$)
Loop
Crsr.Close
End If
end sub
Please can you provide the proper code, is NOT to make my job, i usesd all i could do
Please give me a help, searching the Forum or the Internet is done more then a few times.
With C, C#, VB, Delphi no problem, but V4A not working and i have no idea what i can do
thanks
Uli - Dataprotec