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();
精彩评论