How are you calling the method? Any chance you are calling it before the
variable is set?
Cheers,
Ralf.

On 9/1/07, candysmate <[EMAIL PROTECTED]> wrote:
>
>   --- In [email protected] <flexcoders%40yahoogroups.com>, "Ralf
> Bokelberg"
> <[EMAIL PROTECTED]> wrote:
> >
> > The syntax looks ok. I guess it is either a timing problem
> > (the locateString is not set, when you try to build your SQL)
> > or a scope problem (locateString is hidden by a local variable
> > of the same name)
> >
> > Maybe you can show us more of the context?
> >
> > Cheers,
> > Ralf.
> >
>
> Here's the function that I use the statement in:
>
> private function nominalLocateRequest():void
>
> {
>
> connectServer();
>
> try
>
> {
> CursorManager.setBusyCursor();
> nominalSearchMessage.text = "Searching . . . .";
> var sql:String = "SELECT * FROM flexing_nominal WHERE
> (account = '" + locateString + "')";
> Alert.show(sql, 'sql is:');
> nominalArrayResult = new
> ArrayCollection(mySQLServer.executeQuery("SELECT * FROM
> flexing_nominal WHERE (account = '" + locateString +"')"));
> nominalSearchMessage.text = "";
>
> }
>
> catch (e:SSPError)
> {
> errorMessage = e.message;
> errorType = e.name;
> errorCode = e.errorCode.toString();
> Alert.show(
> "Error Message: "
> + errorMessage +
> "\n"
> + errorType +
> "\n"
> + errorCode,
> 'Grower Search Error:'
> );
> }
>
> disconnectServer();
> nominalSearchGrid.selectedIndex = 0 ;
> CursorManager.removeBusyCursor();
> nominalSearchGrid.setFocus();
> }
>
> (The MySQL stuff is Janus MS SQL connection stuff - I'm testing the
> 1.5 Beta)
> I popped in the Alert to help me debug. A textInput with
> text-"{locateString}" shows the correct string which should be
> passed. The alert box showed that the SQL request query was being
> passed a null.
>
> Many thanks for looking.
>
>  
>



-- 
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35

Reply via email to