Question : Verify input data from database via call to ASP

I'm being asked to do the following...

capture a number from the user (got that part) and determine if it matches a number in a database.

Basically, send the captured text as a variable to an ASP page, get a response back and run an if / else function.

Does anyone have any example with some if/else logic dealing with ASP.

Never done this... in AS 3, what do you have to do to communicate with ASP? Anyone have a simple working example of this?

Thanks!

Answer : Verify input data from database via call to ASP

I am not an ActionScript expert but using AJAX or some page "load" is what you would need for clientside ActionScript to "talk" with ASP.

The ASP for an If is ...

If then
   ' code to be run
End if

The "" part is your conditional statement (e.g. If var = "this").  However an If isn't really what you want if the ASP is checking a database.  Use an SQL query to look for that number.  If the returned recordset is "blank" then you know the number doesn't exist.  That is where you would have the If ..

If rs.EOF then
   ' there was no number match
Else
   ' the number was found
End if

Let us know how this helps.  If you need all of this done then you may need more than one question because this is more of a project than a single question.  Factors like the database, field names, and data types will all matter.

Let me know if you have a question or need more info.

bol

Random Solutions  
 
programming4us programming4us