Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Failed to Parse SQL errors
Brady Boyd
Posts: 5
 
Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 11:35 AM
fiogf49gjkf0d
We have recently upgraded from 5.2 to 6.2 and now are receiving a lot of Failed to Parse SQL errors. Here's a sample insert that's giving us the error:

strInsertHistorySQL = "Insert into History(HISTORYID, ACTIVITYID, TYPE, ACCOUNTID, CONTACTID, OPPORTUNITYID, ACCOUNTNAME, CONTACTNAME, " & _
"OPPORTUNITYNAME, PRIORITY, CATEGORY, STARTDATE, DURATION, DESCRIPTION, PROCESSID, PROCESSNODE, TIMELESS, " & _
"RECURRING, ACTIVITYBASEDON, USERID, USERNAME, ORIGINALDATE, RESULT, RESULTCODE, " & _
"CREATEDATE, CREATEUSER, MODIFYDATE, MODIFYUSER, COMPLETEDDATE, COMPLETEDUSER, NOTES, LONGNOTES, ATTACHMENT) Values( " & _
StringQuote(strHistoryID) & ", NULL, '262148', " & _
StringQuote(GetPropertyOf("txtAccountID", "Text")) & ", " & _
StringQuote(strContactID) & ", " & _
StringQuote("") & ", " & _
StringQuote(strAccount) & ", " & _
StringQuote(GetContactName(strContactID)) & ", " & _
StringQuote("") & ", " & _
StringQuote("NONE") & ", " & _
StringQuote(GetPropertyOf("txtFamily", "Text")) & ", GetDate(), " & _
StringQuote("15") & ", 'Information', '', '', 'T', NULL, NULL, " & _
StringQuote(currentuserid) & ", " & _
StringQuote(GetUserName(currentuserid)) & ", GetDate(), " & _
"'', '', GetDate(), " & _
StringQuote(currentuserid) & ", GetDate(), " & _
StringQuote(currentuserid) & ", GetDate(), " & _
StringQuote(currentuserid) & ", " & _
StringQuote(strHistoryNoteShort) & ", " & _
StringQuote(strHistoryNote) & ", NULL)"
[Reply][Quote]
Carla Tillman
Posts: 290
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 11:42 AM
fiogf49gjkf0d
Hi Brady,
What is the Error from Event Log look like?

c
[Reply][Quote]
Brady Boyd
Posts: 5
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 12:06 PM
fiogf49gjkf0d
Is this Event Log on the SQL server? Thanks.
[Reply][Quote]
Carla Tillman
Posts: 290
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 12:08 PM
fiogf49gjkf0d
The error thrown will probably be on the app server.
[Reply][Quote]
Brady Boyd
Posts: 5
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 12:14 PM
fiogf49gjkf0d
The Source is:
SLXSyncService

The event is:
Unable to retrieve ServiceFilePath from database.
[Reply][Quote]
Carla Tillman
Posts: 290
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 12:33 PM
fiogf49gjkf0d
those look unrelated to me...

is your original script an outside process with the SLx library added to the project?

c
[Reply][Quote]
Brady Boyd
Posts: 5
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 1:18 PM
fiogf49gjkf0d
I'm wondering if this might be related:
http://crm.ittoolbox.com/groups/technical-functional/saleslogix-l/syncservice-not-starting-510444
[Reply][Quote]
Brady Boyd
Posts: 5
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 06 1:21 PM
fiogf49gjkf0d
Ah, I missed this event:

Attempting to read ServiceFilePath from database connection: Provider=;Initial Catalog=;Data Source= ERROR: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 06 1:31 AM
fiogf49gjkf0d
the service file path has absolutely nothing to do with the issue you are having. It's unrelated and simply means that it can't find the location of your sync service file. Therefore, the service for SyncServer may as well be stopped (as it's automatic).
There won't be anything in the log re: your failed to parse error. You have the error already - it failed to parse the SQL. The SQL you have (a direct insert using strings etc) is just bad - as you will run into date issues. You should look at using DBEdit/DBInsert (as this is legacy) or, preferably, move to Active Script and use ADO/Paramaterised queries. To find the issue - use SLXProfiler (found in the program filesf\saleslogix folder) to "watch" this query and you will be able to capture what it's doing. But, anyway, you will still need to alter your code.

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 06 1:36 AM
fiogf49gjkf0d
Here's the fix for this:

This means that the sync service failed to find a required key in the
registry. If you look in:

HKEY_LOCAL_MACHINE\SOFTWARE\SalesLogix\Synchronization\Services

create a new string value called "SrvcFilePath" and put the location to your
SyncServices.cfg in this key then it should work.
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 06 9:51 AM
fiogf49gjkf0d
If you don't want to use the profile, you could add a MsgBox statement to dispaly the SQL statement. You should be able to see the syntax problem. It is usually a date, or an embedded single-quote.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Aug 06 4:03 PM
fiogf49gjkf0d
Being the originator of the post there, the issue only affected a clean 6.1 install. I don't upgrade SLX: I uninstall, clean out registry and file locations and start from scratch. I did the same process for our 6.2 install on the same machine the error originated and it did not come back. This suggested to me that the issue was only affecting 6.1 installs but it's possible that it could affect later versions.

Insert statements choke on most memo fields and is more likely the problem unless they're always NULL. Usually the problem is when users enter special characters which introduce an escape in your command. Debugging that is fun because you may be typing perfectly okay text but your users probably won't.
[Reply][Quote]
Carlos H. Treviño
Posts: 10
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 06 6:28 AM
fiogf49gjkf0d
Single quotes are the most common problem. You might want to make a function to search every value for single quotes and replace them with 2 single quotes. For example if you have a last name O'Brien you need to write it in the query as O''Brien.
[Reply][Quote]
Jean-Claude
Posts: 10
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 May 10 12:08 PM
Very good Mike, it's applicable on the 7.52 on the W2008R2 ! Very great ! Thanks
[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 May 10 12:37 PM
Absolutely - still works on every version !
Mike
[Reply][Quote]
John Paul Welther
Posts: 27
 
Re: Failed to Parse SQL errorsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Jan 11 5:44 PM
fiogf49gjkf0d

FYI on Windows server 2008 systems(64-bit) the registry key location has changed to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SalesLogix\Synchronization\Services

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/5/2025 12:58:08 PM