Type TFlight (actype As String)
Sub get_adata_fromsql (icao As String) As TFlight
If sql1.IsInitialized=True Then
Dim f As TFlight
f.Initialize
cursor1=sql1.ExecQuery("SELECT * from aircraft WHERE abc="& Chr(34)& icao & Chr(34))
If cursor1.RowCount>0 Then
Try
cursor1.Position=0
f.actype=cursor1.GetString2(13)
If f.actype.Length=0 Then
Log("***")
End If
Catch
Log("Exception on SQL: "&icao)
End Try
End If
End If
Return f
End Sub