15.10.2012 Views

Actionscript 3 Entwicklerhandbuch

Actionscript 3 Entwicklerhandbuch

Actionscript 3 Entwicklerhandbuch

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ACTIONSCRIPT 3.0 ENTWICKLERHANDBUCH<br />

Arbeiten mit lokalen SQL-Datenbanken in AIR<br />

import flash.data.SQLConnection;<br />

import flash.errors.SQLError;<br />

import flash.filesystem.File;<br />

var conn:SQLConnection = new SQLConnection();<br />

// The database file is in the application storage directory<br />

var folder:File = File.applicationStorageDirectory;<br />

var dbFile:File = folder.resolvePath("DBSample.db");<br />

try<br />

{<br />

conn.open(dbFile);<br />

trace("the database was created successfully");<br />

}<br />

catch (error:SQLError)<br />

{<br />

trace("Error message:", error.message);<br />

trace("Details:", error.details);<br />

}<br />

<br />

<br />

<br />

<br />

<br />

<br />

Letzte Aktualisierung 27.6.2012<br />

765

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!