Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cursor recordset with access database on lan dir

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
222
0
16
IT
I use the tipical ado jet con and vb6 classic.
To understand...

when i open a table to addnew records is required to open the table with rs.cursorlocation=server or not?

similar:

Set RS = New ADODB.Recordset
RS.CursorLocation = adUseServer
RS.Open "[" & TABELLA & "]", CONN, 3, 3, adCmdTable
 
You don't have to, but there are good reasons why the ADO default is server-side cursors.

The choice should be made based on what you are trying to do. There isn't any one size fits all answer.

Ask yourself why you think you want a client cursor.
 
bu i see on MS...

....
In ADO, call for a server-side cursor by using the adUseServer CursorLocationEnum. With a server-side cursor, the server manages the result set using resources provided by the server computer. The server-side cursor returns only the requested data over the network. This type of cursor can sometimes provide better performance than the client-side cursor, especially in situations where excessive network traffic is a problem.
However, it is important to point out that a server-side cursor is — at least temporarily — consuming precious server resources for every active client. You must plan accordingly to ensure that your server hardware is capable of managing all of the server-side cursors requested by active clients. Also, a server-side cursor can be slow because it provides only single row access — there is no batch cursor available.
Server-side cursors are useful when inserting, updating, or deleting records. With server-side cursors, you can have multiple active statements on the same connection.
....

in effect my access database is on a Lan dir
 
For adding records you don't want a Recordset anyway in most cases. It is usually better to call Execute on a Connection or Command object instead.

Client cursor Recordsets are optimized for things like read-only access, data binding, and batch updating.

There simply is no single, universal "best" answer. This is exactly why we have choices.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top