Показать сообщение отдельно
Старый 31.08.2010, 18:52
Doctor76 вне форума Посмотреть профиль Отправить личное сообщение для Doctor76 Найти все сообщения от Doctor76
  № 1  
Ответить с цитированием
Doctor76
 
Аватар для Doctor76

Регистрация: Nov 2007
Сообщений: 183
По умолчанию Добавление данных в бд SQL

Всем добрый день!

Скажите пожалста, у кого нибудь может был опыт работы с БД SQL в AIR

Хочу вставить данные в таблицу. В мануале написан след. пример:
Код AS3:
   var insertStmt:SQLStatement = new SQLStatement();
   insertStmt.sqlConnection = conn;
   // define the SQL text
   var sql:String =
         "INSERT INTO employees (firstName, lastName, salary) " +
          "VALUES ('Bob', 'Smith', 8000)";
          insertStmt.text = sql;
        // register listeners for the result and failure (status) events
        insertStmt.addEventListener(SQLEvent.RESULT, insertResult);
         insertStmt.addEventListener(SQLErrorEvent.ERROR, insertError);
        // execute the statement
        insertStmt.execute();
       function insertResult(event:SQLEvent):void
       {
         trace("INSERT statement succeeded");
       }
       function insertError(event:SQLErrorEvent):void
       {
           trace("Error message:", event.error.message);
           trace("Details:", event.error.details);
       }
А как вместо вот такого: ('Bob', 'Smith', 8000)" , вставить туда свои какие то переменные?
Че то я недотумкаю.