开发者

Appropriate C# command for ADO.NET SQlite when implementing COUNT() query

Consider this command, as written here:

Command.CommandText = "SELECT COUNT(ASSET) AS POSEXISTS FROM POSITIONS WHERE ASSET = @ASSET";
        Command.Parameters.Add("@ASSET",DbType.String).开发者_Python百科Value = Symbol;

So here, how should I execute this query so that, I can receive the POSEXISTS variable in the C# environment.

Soham


int posExists = (int)Command.ExecuteScalar();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜