Android Question Reading data from a SQL table....

David Elkington

Active Member
Licensed User
Longtime User
I was wondering if anyone can help. I am trying to read a table (SQL Server 2012) using jRdc but cant seem to get off the ground. I would like to scroll through the records and read teh values, ready to put into the local table on the tablet.

Here is what I have so far...

On the java server I have the following statement in the config...

#Files
sql.select_fileattach_PKWScxA2Q=Select fil_id,fil_type_ID,fil_name,fil_description,fil_expires,fil_expired,fil_remove_on_expire from tbl_files where fil_target_ID=?


I then get a result in the recordset with 1 row as expected, but when I try to read the row, I just get a zero using the following code..

For Each records() As Object In result.Rows
Dim name As String = records(0)
Log(name)
Next
If I look at the name value it is 0(should be 1) , if I try Records(1) I just get and error evaluating Expression. Is there something I am doing wrong?
 
Top