SeriesArticleNavigation
- Index of flex and fms3 articles
- Open-source flex air free passion video chat room, Free Network Remote Video Conferencing System (jointly created by flex and fms3 ))
A. Flex air SQLite Development Summary
1. Use semicolons to separate SQLite statements
Example: Select * From tablea; select * From tableb;
2. About Using One sqlstatement In Flex to execute multiple SQL statementsCodeProblems
Sometimes we may execute multiple SQL statements at a time. Unfortunately, one sqlstatement only executes the first SQL statement.
Below is a simple piece of code that can help you solve this problem, but you need to use ';' in SQL:
Try {
// Separate all statements
VaR parts: array = createsql. Split (');');
For (var I: int; I <parts. length; I ++ ){
// Only, if we really have an SQL statement
If (''! = Parts [I]) {
Createstmt. Text = parts [I] + ');';
Createstmt.exe cute ();
}
}
} Catch (error: sqlerror ){
// Something failed...
}
For more information, see
B. SQLite development tools
SQLite spy
Http://www.yunqa.de/delphi/sqlitespy
A very good SQLite Database Explorer and query analyzer. No installation is required.I strongly recommend this and use it myself.
Dbtools Manager
Http://www.dbtools.com.br/
Multi-Database Manager in the free version and SQLite
Aqua data Studio
Http://www.aquafold.com/
There is a lot of functionality that supports a lot of database software, you can use JDBC or ODBC to support SQLite query.
There is also SQLite administrator, and later I found that the Firefox plug-in (Addons) SQLite manager is also a good choice.
C. Syntax differences between SQLite and SQL Server
1. Return the last inserted id value
Returns the last inserted id value. @ identity is used by SQL Server.
SQLite uses the scalar function last_insert_rowid ()
Returns the row identifier (generated primary key) of the last row inserted to the database through the current sqlconnection ). This value is the same as the value returned by the sqlconnection. lastinsertrowid attribute.
2. Top N
In SQL Server, the first two rows can be returned as follows:
Select Top 2 * from AA
Order by IDS DESC
Use Limit in SQLite. The statement is as follows:
Select * from AA
Order by IDS DESC
Limit 2
3. getdate ()
Getdate () in SQL Server Returns the current system date and time
Not in SQLite
4. exists statement
Insert data in SQL Server (insert data if IDs = 5 does not exist)
If not exists (select * from AA where IDs = 5)
Begin
Insert into AA (nickname)
Select 'T'
End
This can be done in SQLite.
Insert into AA (nickname)
Select 'T'
Where not exists (select * from AA where IDs = 5)
5. nested transactions
SQLite only allows a single active transaction
6. Right and full outer join
SQLite does not support right Outer Join or full outer join.
7. updatable views
The SQLite view is read-only. You cannot execute Delete, insert, or update statements on a view. SQL server can delete, insert, or update a view.
Finally, we recommend several websites to help develop SQLite:
SQLite Official Website
Http://www.sqlite.org/
SQL syntax
Http://www.sqlite.org/lang.html
SQLite Chinese site
Http://www.sqlite.com.cn/
Http://www.sqlitechina.org/
Adobe AIR includes the ability to create and use a local SQL database
Http://help.adobe.com/zh_CN/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118676a5497-7fb4.html
For the Adobe AIR language, refer to the SQL support in the local database.
Http://help.adobe.com/zh_CN/AIR/1.5/jslr/index.html? Localdatabasesqlsupport.html
Favorites and sharing
Add QQ bookmarks to Baidu souzang and Yahoo favorites
RSS subscribe to me What is RSS?
Dongguan. Net Club
Welcome to join