Quantcast
Channel: Adobe Community : All Content - AIR Development
Viewing all articles
Browse latest Browse all 2954

BEGIN in SQL in AIR?

$
0
0

HI

 

I understand how to use the BEGIN and COMMIT listeners etc.

 

I was wondering if you can use BEGIN TRANSACTION and COMMIT around a bunch of SQL processes in a single string?

 

eg

 

"BEGIN TRANSACTION

 

CREATE INDEX IF NOT EXISTS idx1 ON table1 (Artist COLLATE NOCASE, Title COLLATE NOCASE);

 

CREATE INDEX IF NOT EXISTS idx2 ON table1 (Id, Date);

 

CREATE INDEX IF NOT EXISTS idx3 ON table1 (Time, Reason COLLATE NOCASE);

 

END TRANSACTION"

 

or do they all have to be separate statements, each with a listener?

 

I ask as I'm getting a "BEGIN is not allowed in SQL" error.

 

Cheers


Viewing all articles
Browse latest Browse all 2954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>