1 Reply Latest reply on Apr 13, 2008 9:58 AM by Dr. Fred Mbogo

    Defining the data type of SELECT result data

      I'm would like to be able to define the data type of a the select result data as mentioned in http://livedocs.adobe.com/air/1/devappshtml/help.html?content=SQL_08.html in a html/js app

      but when running the code below I get a "Error #1034: Type Coercion failed: cannot convert __HTMLScriptFunction@14b6bc9 to Class." error

      function Employee()
      this.empId = null;
      this.firstName = null;
      this.lastName = null;
      this.salary = null;
      // A SQLConnection named "conn" has been created previously
      var selectData = new air.SQLStatement();
      selectData.sqlConnection = conn;
      selectData.text = "SELECT * FROM employees";
      selectData.itemClass = Employee;
      var results = selectData.getResult();

      Can anyone help me with this?