by merror (3 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 24th March 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Returns Table Data! Returns Data over ADO from a given Field in a given Table with a given condition. Makes it easier to get the data of only
'22.3.200 [email protected]
'cnnMain = Open Connection
On Error GoTo Err_ReturnTableData
Dim rstRec As New ADODB.Recordset
Dim strSQL As String
Let strSQL = "SELECT " & strReturnField & " FROM " & strTableName & " " & strWhereCondition
rstRec.Open strSQL, cnnMain, adOpenStatic, adLockOptimistic
If rstRec.RecordCount > 0 Then
ReturnTableData = NullChecked(rstRec(strReturnField))
Else
ReturnTableData = ""
End If
Exit_ReturnTableData:
Exit Function
Err_ReturnTableData:
'your error handling here
Resume Exit_ReturnTableData:
No comments have been posted about Returns Table Data! Returns Data over ADO from a given Field in a given Table with a given conditio. Why not be the first to post a comment about Returns Table Data! Returns Data over ADO from a given Field in a given Table with a given conditio.