Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Copper Elite Contributor
Posts: 72
Registered: ‎04-01-2009

Edit box text not being accepted by sql statement in SLX LAn v7.2.1

[ Edited ]

Hi all.

 

I have the following script:

 

   strSQL = "SELECT   SD.TOTAL_SALES As TotalSales, SD.SALES_YEAR AS Year"

   strSQL = strSQL  & " FROM C_myTable SD"

   strSQL = strSQL  & " WHERE SD.ACCOUNTID = '" & Edit1.Text  & "'"

 

Which is in an ACCOUNT FORM plugin.

 

When I release the plugin and view what is going on in the SLX Profiler it shows the line:

 

WHERE SD.ACCOUNTID = ''

 

But when I do the following in the script:

   strSQL = "SELECT   SD.TOTAL_SALES As TotalSales, SD.SALES_YEAR AS Year"

   strSQL = strSQL  & " FROM C_myTable SD"

   strSQL = strSQL  & " WHERE SD.ACCOUNTID = '123456' "

 

Then the profiler shows:

WHERE SD.ACCOUNTID = '123456'

 

The edit box does show the correct ACCOUNTID.

 

This form is opened after the end user clicks a button.

 

The button's OnClick event is as follows:

 

Application.BasicFunctions.DoInvoke "Form", "Personal: C_myForm"

 

Thank you in advance!

Message Edited by SLX_User on 09-01-2009 01:05 PM
Copper Elite Contributor
Posts: 72
Registered: ‎04-01-2009

Re: Edit box text not being accepted by sql statement in SLX LAn v7.2.1

I got it to work by using: Application.BasicFunctions.CurrentAccountID