The Infor CRM (Saleslogix) OLE DB Provider’s connection string allows you to connect to the Infor CRM (Saleslogix) database using OLE DB. However, before you can use the provider, it is important to understand the various parts that make up the connection string. A connection string is something used when connecting to an OLE DB provider. This is something that you will need to connect to a database via ADO, ADO.NET, or other OLE DB capable technology. This article will explain the various parts of the connection string used when making a connection.
The Infor CRM Provider Connection String
Let’s start by taking a look at a complete SalesLogix connection string:
Provider=SLXOLEDB.1;Data Source=MYSLXSERVER;Initial Catalog=MYSLXCONNECTIONALIAS;User Id=Admin;Password="";Persist Security Info=True; Extended Properties="Port=1706;Log=On"
Connection String Properties
Provider: This specifies the provider name. For an Infor CRM connection, this will always be SLXOLEDB.1
Data Source: This specifies the host name or IP address of the Infor CRM server
Initial Catalog: A valid alias that has been configured in the Connection Manager on the Infor CRM Server.
User ID: A valid Infor CRM user name (not a database level user, such as sysdba, but an Infor CRM user, such as “admin” or “lee”). The user provided here will dictate the security for the connection. For example, if you use the user “lee” here, then the data returned from SELECT statements executed with this connection will only return rows that the user “lee” has access to.
Password: The password that corresponds to the user name given for the User ID
Persist Security Info: When set to ‘true’ will persist the user’s authentication information. You will likely want this to be ‘true’ in every case.
RWPass: If an RW password is defined for the connection on the Infor CRM Connection Manager, you can supply that here for a “writable” connection. If there is not an RW password defined for the connection, this can be omitted.
Connection String Extended Properties
The extended, or optional, properties is a list of extra properties that can be used with the Infor CRM provider. These properties are:
Port: The port that the specified SalesLogix Server is listening on. The default port is 1706. This is configured in the SlxLocalServers.xml file found on the SalesLogix Server.
Log: Set to either ON or OFF. The default is ON. This enables or disables sync logging for the connection.
Timezone: Values for this property can be an Index or a Name value for the specified Timezone. Specifies the time zone to use when the OLE DB provider converts date / time fields between the database and client. Date time data is stored in UTC in the database, and must be converted to local time on the client. If this property is omitted, the provider will default to the current time zone settings of the client computer.
The preferred method is using the numeric INDEX value, however as a user could edit the registry entries or create new time zones, this property may not be present or duplicated, so the option to use the STANDARDNAME is also provided as a back up. The STANDARDNAME is actually the registry key name (See HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersions\Time_Zones) in the time zones section, and cannot be duplicated.
If the INDEX or STANDARDNAME is not found (or in the case of INDEX, duplicated) a time zone not found error will be reported.
To disable date / time conversion, specify NONE as the value (this will typically mean all dates will be in GMT)
For a list of INDEX and STANDARDNAME values, see the slx_timezonelist stored procedure.
IncludeCalcFields: This extended property is set to either ON or OFF. The default setting is OFF. This tells the provider to include calculated fields in SELECT * queries. You can still manually select individual calculated fields (i.e. SELECT FULLNAME FROM CONTACT)
Impersonate: Set this extended property to a valid Infor CRM username (such as lee or bgates). Adding this to the connection string will enable security for the user you are impersonating for security. For example, if I supply ‘lee’ as the value for Impersonate, then all queries will return only rows that lee has access to, even though you are logged in as admin. Why is this useful? Because you can inherit the security of the user ‘lee’ in the database, returning only the records ‘lee’ has access to, without logging in as lee – so you don’t need to know lee’s password.
TrimCharFields: This connection string property provides additional backward compatibility for connecting to legacy code. In earlier versions of SalesLogix, the Borland Database Engine (BDE) trimmed strings coming from the database, but ADO does not. TrimCharFields allows trimming to be turning on when returning Data from the database on CHAR Data Types. The default setting is off.
Using Integrated Security (Windows Authentication) in a Connection String
Infor CRM has the ability for linking a SalesLogix user account to an account in the Active Directory or domain. This ability allows a user to bypass the Sales Client login screen and automatically log in if they have successfully authenticated with the Active Directory or domain. These SalesLogix users will likely never know how to handle an Infor CRM login screen since they don’t typically ever see one. As an Infor CRM developer, it is a great idea to provide this same ability in your own addon applications.
Refer to the Infor CRM Administrator documentation for more information on using Windows authentication for Infor CRM users
To use integrated security in the connection string, simply remove the “User ID” and “Password” properties and instead include the following property:
Integrated Security: Set to true to use Windows authentication (assuming the Infor CRM user has been linked to an Active Directly/Domain account. This connection string would look like this:
Provider=SLXOLEDB.1;Integrated Security=True;Data Source=MYSLXSERVER; Initial Catalog=MYSLXCONNECTIONALIAS; Extended Properties=PORT=1706;LOG=ON;Location=;Mode=ReadWrite
Note: this article has been republished from an earlier slxdeveloper article I wrote on the subject and updated for current Infor CRM versions