开发者

ADODB Command?

开发者 https://www.devze.com 2023-01-22 19:13 出处:网络
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?

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

精彩评论

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