Using the DataGrid in Access must be noted

Source: Internet
Author: User
Tags constant cursor library client
Topic Address: Http://access911.net/index.asp?board=4&recordid=74FAB41E15DC


Problem:

Can I use the DataGrid control in an Access form?
Dim rs as New ADODB. Recordset
Rs. Open "SELECT * FROM Table 1", CurrentProject.Connection, 1, 1
Set DG1. DataSource = RS
' Dg1 is a DataGrid, am I setting this up right? How come there's no reaction?

My environment is not VB, is the VBA access environment, who can help?

Reply:


to be preceded by Rs.Open br> The
rs.cursorlocation = adUseClient


is only available


The following is a reference:
CursorLocation Property (ADO)

Set or return to the cursor engine location. The

Setting and return value

Sets or returns a Long value that can be set to one of the following constants. The

Constant describes that
Adusenone does not use a cursor service. (The constant is obsolete and appears for backward compatibility only). The
adUseClient uses client-side cursors provided by the local cursor library. Many of the features that are commonly allowed by the local cursor engine may be that the cursors provided by the driver cannot be used, so using this setting is beneficial for the features that will be enabled. adUseClientBatch is synonymous with adUseClient and supports backward compatibility. The
adUseServer default value. Use a cursor provided by the data provider or driver. These cursors are sometimes very flexible and have additional sensitivity to changes made by other users to the data source. However, some features of Microsoft Client Cursor Provider (such as disconnected recordsets) cannot be emulated by a server-side cursor, and these features are not available through this setting.


Description

This property allows you to select among the various cursor libraries available to the provider. Typically, you can choose to use either the Client cursor library or a cursor library located on the server.

This property setting affects only connections that are established after the property has been set. Changing the CursorLocation property does not affect existing connections.

The property is read/write for a Connection or closed Recordset, and the property for an open Recordset is read-only. The setting is inherited by the

Connection.Execute cursor. Recordset willThis setting is automatically inherited from the connection to which it is associated.

Remote Data Service usage You can only set the CursorLocation property to adUseClient when used with a client (ADOR) Recordset or Connection object.







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.