--- In flexcoders@yahoogroups.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.