I have a query that counts rows, so it only returns an integer.
Dim strQuery As String = "SELECT COUNT(*) FROM table WHERE ..."
How can I store this integer into a variable so I can use it later?
I have a query that counts rows, so it only returns an integer.
Dim strQuery As String = "SELECT COUNT(*) FROM table WHERE ..."
How can I store this integer into a variable so I can use it later?
You use NuGet package mnaager to install Dapper, then you do:
Dim con = "YOUR CONNECTION STRING HERE!"
Dim sql = "SELECT COUNT(*) FROM person WHERE lastname = @LN"
DIm count = New MySqlConnection(con).QuerySingle(sql, New With{.LN = "Smith"})