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
I asked in another Thread but it did not realy help to my problem, so i try again and hopefully get a helpful respond
I need only the respond from the server, the query is a real query i have to use.
What i'm doing wrong ???
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			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
I asked in another Thread but it did not realy help to my problem, so i try again and hopefully get a helpful respond
I need only the respond from the server, the query is a real query i have to use.
What i'm doing wrong ???
			
				B4X:
			
		
		
		'****here the full code again
#AdditionalJar: jtds-1.3.1.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_Datos"
    Private Username As String = "sa"
    Private Password As String = "1234"
End Sub
    '*** Works without any Error, but no Result ***
Sub cmdConnect_Click
    msSQL.Close
    msSQL.InitializeAsync("msSQL", driver, jdbcUrl, Username, Password)
    
        Dim sf As Object = msSQL.ExecQueryAsync("msSQL", "SELECT UserID, Name FROM UserInfo_Table WHERE UserID = '5'", Null)
        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 
				 
 
		 
 
		 
 
		 
 
		