Re: Any reason why accessing Access should slowdown?



On Mon, 2 Oct 2006 08:20:02 -0700, JohnBury <JohnBury@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I just tried the following simple example and it worked for me. Initially the DataGrid is not bound
to a Data Control. It worked fine for all of the CursorTypes. The CursorLocation must be
client-side. The Requery method is not required.

cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Test Files\db1 XP.mdb;" & _
"Jet OLEDB:Engine Type=4;"

rs.CursorLocation = adUseClient
rs.Open "SELECT * FROM TABLE_1", cnn, adOpenStatic, adLockReadOnly

rs.Filter = "Col2 = 8"

Set DataGrid1.DataSource = rs

Make sure that you do not close either the Recordset or the Connection.


Paul
~~~~
Microsoft MVP (Visual Basic)
.



Relevant Pages

  • Need example of using ADO DataControl and DataGrid control - VB6
    ... Can anyone tell me one or more sources of detailed examples of using ADO ... Data Control and DataGrid control? ... I am struggling with even the simple task of displaying data from the pubs ... Place an ADO data control and DataGrid on the form ...
    (microsoft.public.vb.database)
  • Re: datagrid search
    ... "David Youngblood" wrote: ... But i am looking for DATAGRID. ... > methods of the data control. ... > Private Sub mnuSearchItem_Click ...
    (microsoft.public.vb.general.discussion)
  • Re: datagird
    ... > I need to know how I can display data into datagrid. ... I think you need to add a data control to your form. ... control to your table using the DataBaseName and RecordSource properties, ...
    (comp.lang.basic.visual.misc)
  • Cannot bind recordset into datagrid
    ... The problem i have is that i want to bind a recordset to a datagrid through a data control. ... With this, the DataGrid doesn't show any data, but it does if the select clause i set it into the "Recordsource" property of the Datasource, but this is what i'm trying to evoid. ...
    (microsoft.public.vb.controls)
  • Problem with Datagrid
    ... The problem i have is that i want to bind a recordset to a datagrid through a data control. ... With this, the DataGrid doesn't show any data, but it does if the select clause i set it into the "Recordsource" property of the Datasource, but this is what i'm trying to evoid. ...
    (microsoft.public.vb.controls)

Loading