the rowset is not bookmarkable

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



hello,

(i am sorry my English is very poor! berg your help! thanks !)

i am a fresh man in vb, i have some trouble when i want to connect to my
database and show the talbe in a datagrid

it says " the rowset is not bookmarkable"
when i debug into this row
"Set DataGrid1.DataSource = rs"

help me, please ! thank you very much!


this is the code:

connString = "driver={SQL Server};server=" + _
Trim(strServer) + _
";uid=" + Trim(strUser) + _
";pwd=" + Trim(strPwd) + _
";database=" + Trim(srtDb)

dbConn.Open connString

sql = "select top 1 * from cas..hd_brie"
Set command.ActiveConnection = dbConn
command.CommandText = sql
'command.Execute

rs.CursorLocation = adUseClient

'rs.Open "hd_brie", dbConn, adOpenKeyset, adLockPessimistic
Set rs = command.Execute
Set DataGrid1.DataSource = rs


.