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: SQL join issue in a datagrid
Glenn Williams
Posts: 51
 
SQL join issue in a datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 Feb 08 8:07 PM
I'm trying to load a datagrid with the following sql. Teh problem is that the first field, the one field from a joined table, will not show up.

select Name , saved, DEVICE_ID, ported from ce_quote_wireless cqw left Join product p On (p.PRODUCTID = cqw.PRODUCTID)

This works fine in Toad, but the first column is blank in the datagrid.


With dgWireless
.SQL.Text = "select Name , saved, DEVICE_ID, ported from ce_quote_wireless cqw left Join product p On (p.PRODUCTID = cqw.PRODUCTID)"

With .Columns
'remove any existing columns
If (.Count > 0) Then
For i = 0 To .Count - 1
.Item(0).Delete
Next
End If

'add column for ACCOUNT field

Set col = .add(0)
col.FieldName ="Name"
col.Caption = "Device"
col.ReadOnly = True

Set col = .Add(0)
col.FieldName ="device_id"
col.Caption = "Device ID"
col.ReadOnly = True
.....

Thanks very much
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: SQL join issue in a datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Feb 08 12:08 AM
Name is probably a reserved word try changing the query as follows (the brackets allow you to use reserved words as field names)

"select [Name] , saved, DEVICE_ID, ported from ce_quote_wireless cqw left Join product p On (p.PRODUCTID = cqw.PRODUCTID)"

if that doesn't work try this:

"select Name as myName , saved, DEVICE_ID, ported from ce_quote_wireless cqw left Join product p On (p.PRODUCTID = cqw.PRODUCTID)"
which will make your first column name "myName"

finally, you may want to prefix your field like so:
"select p.Name as [Name], saved, DEVICE_ID, ported from ce_quote_wireless cqw left Join product p On (p.PRODUCTID = cqw.PRODUCTID)"

ONE of these will work
[Reply][Quote]
Glenn Williams
Posts: 51
 
Re: SQL join issue in a datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Feb 08 11:43 AM
Thanks, but I found my stupid mistake. I did not have one of the tables filled properly. I do not understand why it worked in TOAD, but it did.


Again, Thanks very much.
[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 3:40:19 AM