开发者

ADODB Command?

I'm using vb.net. Usually I used the SQL Server SQLComamnd but here I need to use an ADO. I have this but I'm stuck at the end of it how to get the data?

dim strSQL = 开发者_运维技巧"Select Name From tblCustomer Where ID = 123"
cnn.Open()
Dim cmd As New ADODB.Command
cmd.CommandType = ADODB.CommandTypeEnum.adCmdText
cmd.ActiveConnection = cnn
cmd.CommandText = strSQL

How do I actually retrieve this record? Is there something akin to the SQLCommand that has Reader?


Where's your Execute call?

Dim results as ADODB.Recordset
Set results = cmd.Execute();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜