Login / Register  search  syndication  about

          Ryan Farley's Blog

Ryan Farley on .NET Development with a focus on CRM Development for SalesLogix

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.

What's This?
Bookmark and Share

About Ryan Farley

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

View the SalesLogix Mobile Seveloper Series
View the SalesLogix SData Developer Series
View the Git for the SalesLogix Developer series

Related Content
   Small Change for Customizations in Infor CRM (Saleslogix) Mobile 3.3 and Higher
There is a small change needed for mobile customizations in Infor CRM (Saleslogix) Mobile version 3.3 and
Posted on May 14, 2015 by Ryan Farley to Ryan Farley's Blog
   Better Code Organization for Infor CRM (Saleslogix) Mobile Customizations
When customizing the Infor CRM (Saleslogix) Mobile client, it's common for the ApplicationModule to g
Posted on May 05, 2015 by Ryan Farley to Ryan Farley's Blog
   Microsoft's New Visual Studio Code IDE and Infor CRM (Saleslogix) Mobile
Today at Microsoft's Build Developer Conference, a new, free, cross-platform code editor for web appl
Posted on Apr 29, 2015 by Ryan Farley to Ryan Farley's Blog
   Problem Showing All Area, Category, and Issue Values in Infor CRM (Saleslogix) Mobile And How to Fix
There is an issue with the Infor CRM (Saleslogix) Mobile client where, if you have a large list of Area,
Posted on Apr 24, 2015 by Ryan Farley to Ryan Farley's Blog
   Creating a Searchable & Filterable ComboBox in Infor CRM (Saleslogix) Web Client
I've had a few posts lately covering the ComboBox control in the Infor CRM (Saleslogix) Web Client. T
Posted on Feb 05, 2015 by Ryan Farley to Ryan Farley's Blog


Jiho Han said:

Well the default seems to have been set to adUseClient.

Set objConn = Application.GetNewConnection
Set objRS = objConn.Execute("SELECT * FROM CONTACT WHERE CONTACTID = '" & Application.BasicFunctions.CurrentContactID & "'")
MsgBox objConn.CursorLocation & ", " & objRS.CursorLocation

The msgbox will report "3, 3" - meaning CursorLocation.
This was not the case for RC2 when I tested it. I am guessing they did this for backward compatibility - it would have broken a lot of existing pre-6.2 code who were upgrading to 6.2.
September 29, 2004 1:16 PM

Ryan Farley said:

Well that is good news. I'll start some testing on that also. Thanks Jiho.
September 29, 2004 9:56 PM

Leave a Comment

All contents Copyright © 2015 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register