Function | Sql_GetField(ByVal strTable As String, strDsn As String, strFieldName As String) As String |
---|---|
strTable: Tabellenname strDsn: Datensatznummer strFieldName: Feldname Public Function Sql_GetField(ByVal strTable As String, strDsn As String, strFieldName As String) As String Dim rs As ADODB.Recordset Dim strSQL As String strSQL = "SELECT " & strFieldName & " FROM " & strTable & " WHERE dsn=" & m_oUtil.SqlUid(strDsn) & " " Set rs = FF_GetRecordset(strSQL) If Not rs.EOF Then Sql_GetField = m_oUtil.k(rs(strFieldName)) Else Sql_GetField = "" End If End Function |