persistentstorage/sql/TEST/t_sqlapi.cpp
branchRCL_3
changeset 12 6b6fd149daa2
parent 11 211563e4b919
child 15 fcc16690f446
equal deleted inserted replaced
11:211563e4b919 12:6b6fd149daa2
   778 _LIT8(KStmt18, "CREATE TABLE BBB(Fld1 INTEGER, Fld2 BIGINT, Fld3 DOUBLE, \
   778 _LIT8(KStmt18, "CREATE TABLE BBB(Fld1 INTEGER, Fld2 BIGINT, Fld3 DOUBLE, \
   779 					                       Fld4 TEXT, Fld5 LONGBLOB, Fld6 TEXT NULL)");
   779 					                       Fld4 TEXT, Fld5 LONGBLOB, Fld6 TEXT NULL)");
   780 _LIT8(KStmt19, "INSERT INTO BBB(Fld1, Fld2, Fld3, Fld4, Fld5, Fld6)\
   780 _LIT8(KStmt19, "INSERT INTO BBB(Fld1, Fld2, Fld3, Fld4, Fld5, Fld6)\
   781 	                                       VALUES(:V1, :V2, :V3, :V4, :V5, :V6)");
   781 	                                       VALUES(:V1, :V2, :V3, :V4, :V5, :V6)");
   782 _LIT8(KStmt20, "SELECT * FROM BBB");
   782 _LIT8(KStmt20, "SELECT * FROM BBB");
       
   783 _LIT8(KStmt21, "SELECT fld1, fld2 FROM AAA;SELECT fld1, fld2 FROM AAA");
   783 
   784 
   784 /**
   785 /**
   785 @SYMTestCaseID			SYSLIB-SQL-CT-1606
   786 @SYMTestCaseID			SYSLIB-SQL-CT-1606
   786 @SYMTestCaseDesc		Preparing SQL statements. Moving to the next record. Retrieving and verifying 
   787 @SYMTestCaseDesc		Preparing SQL statements. Moving to the next record. Retrieving and verifying 
   787 						the column types and values. Binding parameter values.
   788 						the column types and values. Binding parameter values.
   810 	//SQL statement without parameters. Create a table.
   811 	//SQL statement without parameters. Create a table.
   811 	stmt = PrepareSqlStmt<DES, BUF>(db, KStmt12, KErrNone);
   812 	stmt = PrepareSqlStmt<DES, BUF>(db, KStmt12, KErrNone);
   812 	ExecSqlStmt(db, stmt, KErrNone);
   813 	ExecSqlStmt(db, stmt, KErrNone);
   813 	stmt.Close();
   814 	stmt.Close();
   814 
   815 
       
   816 	//String containg more than one SQL statement.
       
   817 	stmt = PrepareSqlStmt<DES, BUF>(db, KStmt21, KErrArgument); 
       
   818 	stmt.Close();
       
   819 	
   815 	//SQL statement without parameters. Insert a record into the table.
   820 	//SQL statement without parameters. Insert a record into the table.
   816 	stmt = PrepareSqlStmt<DES, BUF>(db, KStmt13, KErrNone);
   821 	stmt = PrepareSqlStmt<DES, BUF>(db, KStmt13, KErrNone);
   817 	ExecSqlStmt(db, stmt, KErrNone);
   822 	ExecSqlStmt(db, stmt, KErrNone);
   818 	stmt.Close();
   823 	stmt.Close();
   819 		
   824