A .NET wrapper to the SQLite database

SQLiteClient.GetOne Method 

Returns the first column of the first row of a queries result set

[Visual Basic]
Public Function GetOne( _
   ByVal query As String _
) As String
[C#]
public string GetOne(
   string query
);

Parameters

query
The query to execute

Return Value

A string of the result

Remarks

Useful for such queries as: SELECT COUNT(*) FROM myTable

Example

            db = new SQLite("testdb");
            string strCount = db.GetOne("SELECT COUNT(*) FROM myTable");
            int intCount = Int32.Parse(strCount);
            

See Also

SQLiteClient Class | SQLite.NET Namespace