Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 23, 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: Datagrid Invalid Column Name
Renee Bender
Posts: 74
 
Datagrid Invalid Column NameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 08 12:46 PM
Hi! A newbie here again! I am trying to modify a datagrid so that it will only give me data for a specific account record. When I try to open the datagrid I get the following error" Invalid column name " strVal " at line 20, char1. Can someone please look at my code and tell me what I am doing wrong?
I am using Saleslogix version 6.2.6.1007.
Thanks in advance!
My code:
Sub AXFormOpen(Sender)
dim strSQL
dim strVal
strVal = Application.GlobalInfo.TempShipFrom

datagrid1.Active = true

strSQL ="SELECT DISTINCT A1.ACCOUNT_SHIPFROMID, A1.SHIP_FROM_NO, A1.ADDRESS1, A1.ADDRESS2, A1.CITY, A1.STATE, A1.POSTALCODE FROM ACCOUNT_SHIPFROM A1 WHERE A1.AccountID = ""' & strVal & '"""

datagrid1.SQL.Text = strSQL

datagrid1.Refresh


Application.GlobalInfo.TempShipFrom = ""
End Sub
[Reply][Quote]
Dan Carvin
Posts: 227
 
Re: Datagrid Invalid Column NameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 08 12:54 PM
""' & strVal & '"""

should be

'" & strVal & "'"

The ' goes into the SQL to enclose the acountid. The " closes the first part of the string. At the end "'" adds a single ' to the SQL to close the quote around the ID.

Looks pretty much the same to us but it makes all the difference in the world when parsed for SQL.
[Reply][Quote]
Renee Bender
Posts: 74
 
Re: Datagrid Invalid Column NameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 08 1:05 PM
Thanks! That worked!!!

Any idea why my data isn't being displayed in the datagrid though? I know that at least one record should show up. Is there something in the datagrid properties that need to be set that I am missing?
Thanks again!
[Reply][Quote]
Dan Carvin
Posts: 227
 
Re: Datagrid Invalid Column NameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 08 1:55 PM
Add the line

msgbox "accountid is " & strVal

to the code above to make sure you're reading the global variable properly.
[Reply][Quote]
Renee Bender
Posts: 74
 
Re: Datagrid Invalid Column NameYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 08 3:09 PM
Thanks!
Everything is working now. I also had to add the AccountID as a hidden column on the datagrid and then my data appeared.
[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): 8/23/2025 10:27:16 AM