2 Replies Latest reply on Mar 20, 2008 7:02 AM by Dave Blake

    Internal Server Error

    Dave Blake
      I am trying to create a login form in flash. I found some coding for an asp page for connecting to a DSN Access database. However, when I hit the submit button on the flash form, I get an Internal Server Error when it trys to load the ASP page. I created a database at Godaddy and this is the name it provided for my DSN setup: access_f22customers.dsn

      Here is the ASP coding:

      <%@Language=Vbscript%>
      <%Option Explicit%>
      <%
      '''''''First, get the stuff from flash
      Dim inUserName, inPassword
      inUserName = Trim(Request("Username"))
      inPassword = Trim(Request("Password"))

      '''''''Now, create the connection object
      Dim myConnection
      myConnection ="access_f22customers.dsn"
      Set myConnection=Server.CreateObject("ADODB.Connection")
      myConnection.Open

      '''''''Here is our SQL statement when we open the Recordset
      Dim loginSQL
      LoginSQL = "SELECT * FROM loginTable WHERE userName = '" & inUserName & "'"
      '''''''Create, and open the Recordset
      Dim myRS
      Set myRS=Server.CreateObject("ADODB.Recordset")
      myRS.Open loginSQL, myConnection

      '''''''Make sure we have some data, if we do, make sure the password matches
      Dim mainMessage
      If myRS.EOF Then
      mainMessage="userInfo=false"
      Else
      If(StrComp(myRS("password"), inPassword, vbTextCompare) =0) Then
      mainMessage="userInfo=true"
      Else
      mainMessage = "userInfo=false"
      End If
      End If
      '''''''Clean up everything
      myRS.Close
      Set myRS=Nothing
      myConnection.Close
      Set myConnection=Nothing

      '''''''Now send the data back to flash
      Response.Write(mainMessage)
      %>

      Thanks,
      Dave