deep
Oct 3rd, 2000, 09:05 AM
Hi,
I have a problem. I am using a datagrid with ADODC. I tried using it with a recordset object it did not work. This is my first problem.
The code that i have is:
Set rs1 = New ADODB.Recordset
strQuery2 = "select" & Chr(34) & "Control_No" & Chr(34) & ","
strQuery2 = strQuery2 & Chr(34) & "Check_In_Name" & Chr(34) & ","
strQuery2 = strQuery2 & Chr(34) & "Check_In_Description" & Chr(34)
strQuery2 = strQuery2 & " from Test_Carinrcdm where "
strQuery2 = strQuery2 & "Car_Number=" & txtCar_Number
'MsgBox strQuery2
rs1.Open strQuery2, cn2, adOpenKeyset, adLockOptimistic
MsgBox rs1("Control_No")
Set DataGrid1.DataSource = rs1
It gives me an error:
Runtime Error: 7004
Rowset not bookmarkable.
My second problem is:
when the records are displayed in the datagrid i do not want to let the user edit it. If i set the enable property to false, it disables the scroller also. I want the scroller to be enabled so that the user can scroll down and see all the records. Is there a way to get around it.
Please help...
I have a problem. I am using a datagrid with ADODC. I tried using it with a recordset object it did not work. This is my first problem.
The code that i have is:
Set rs1 = New ADODB.Recordset
strQuery2 = "select" & Chr(34) & "Control_No" & Chr(34) & ","
strQuery2 = strQuery2 & Chr(34) & "Check_In_Name" & Chr(34) & ","
strQuery2 = strQuery2 & Chr(34) & "Check_In_Description" & Chr(34)
strQuery2 = strQuery2 & " from Test_Carinrcdm where "
strQuery2 = strQuery2 & "Car_Number=" & txtCar_Number
'MsgBox strQuery2
rs1.Open strQuery2, cn2, adOpenKeyset, adLockOptimistic
MsgBox rs1("Control_No")
Set DataGrid1.DataSource = rs1
It gives me an error:
Runtime Error: 7004
Rowset not bookmarkable.
My second problem is:
when the records are displayed in the datagrid i do not want to let the user edit it. If i set the enable property to false, it disables the scroller also. I want the scroller to be enabled so that the user can scroll down and see all the records. Is there a way to get around it.
Please help...