Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 61 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 61 Rev 64
Línea 23... Línea 23...
23
        if (sqlite3_prepare_v2(db, query, -1, &statement, nil) == SQLITE_OK) {
23
        if (sqlite3_prepare_v2(db, query, -1, &statement, nil) == SQLITE_OK) {
Línea 24... Línea 24...
24
                
24
                
25
            sqlite3_bind_int(statement, 1, Int32(record.type))
25
            sqlite3_bind_int(statement, 1, Int32(record.type))
26
            sqlite3_bind_text(statement, 2, record.data , -1, SQLITE_TRANSIENT)
26
            sqlite3_bind_text(statement, 2, record.data , -1, SQLITE_TRANSIENT)
-
 
27
           if (sqlite3_step(statement) == SQLITE_DONE) {
27
           if (sqlite3_step(statement) == SQLITE_DONE) {
28
               
-
 
29
               result = Int(sqlite3_last_insert_rowid(db))
-
 
30
 
28
               result = Int(sqlite3_last_insert_rowid(db))
31
               
29
           } else {
32
           } else {
Línea 30... Línea 33...
30
                print("No se pudo insertar el registro ( type: \(record.type) data: \(record.data)   en la tabla: \(Constants.TABLE_SYNC)")
33
                print("No se pudo insertar el registro ( type: \(record.type) data: \(record.data)   en la tabla: \(Constants.TABLE_SYNC)")