More on CursorLocation with SalesLogix

In response to my last post, Jeremy Brayton asked an important enough question that I felt warranted another post on the subject.

Does the provider default to client side now? Or do we have to explictely call this. My guess would be no, that it ADO recordsets default to server side and they can’t be altered.

As Jeremy mentioned, it’s not the SalesLogix provider that provides the defaults, it is the ADO objects that do. The ADO Recordset object defaults to a server-side cursor when none is explicity set. So you will need to add the line to set the client-side cursor.

One other thing to note. A common shortcut for opening up a recordset is to execute a query using a Connection object, such as the following:

Set objRS = Application.GetNewConnection.Execute("select * from contact")

You really shouldn’t do this since this method uses the ADO defaults, which means a server-side cursor. You really should create a Recordset object and open normally so you are able to specify a client-side cursor as the code below demonstrates:

Dim objRS

    Set objRS = CreateObject("ADODB.Recordset")
    objRS.CursorLocation = adUseClient
    objRS.Open "select * from contact", Application.GetNewConnection

Small changes in the provider, really only to enforce what has always been the case with the SalesLogix provider. The best route is to do what SalesLogix does. Make a generic script that returns to you a recordset. Then anytime you need one you get it from that generic script. Or you could use the script that SalesLogix uses for their own customizations (See the GetNewRecordset function in the SLX_DB class which can be located in the System:SLX Database Support plugin.

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

1 Comment

  1. Well that is good news. I’ll start some testing on that also. Thanks Jiho.

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!