3/14/2026 5:26:11 PM
|
| |
| 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!
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.
|
|
|
|
SQL String not working
Posted: 17 Feb 10 11:43 AM
|
Any ideas why the following code is not giving me any results (even though there are records):
strSQL = "(Select ACCOUNTID FROM C_myTable WHERE '" & cmbItems.Text & "' = 'YES' AND ZONE = '" & cmbZone.Text & "')"
yet when I hard code the value that is in the cmbItems combo box it does work:
strSQL = "(Select ACCOUNTID FROM C_myTable WHERE myItem = 'YES' AND ZONE= '" & cmbZone.Text & "')" |
|
|
|
Re: SQL String not working
Posted: 17 Feb 10 11:51 AM
|
Nevermind. I figured it out, I needed to remove the single quotes:
strSQL = "(Select ACCOUNTID FROM C_myTable WHERE " & cmbItems.Text & " = 'YES' AND ZONE = '" & cmbZone.Text & "')" |
|
|
|
Re: SQL String not working
Posted: 17 Feb 10 12:02 PM
|
Remove the quotes around your column name (if "myitem" is your column name).
strSQL = "(Select ACCOUNTID FROM C_myTable WHERE " & cmbItems.Text & " = 'YES' AND ZONE = '" & cmbZone.Text & "')" |
|
|
|
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!
|
|
|
|
|
|
|
|