i created a Cdatabase object linked to ms sql server
i excute sql command by
CDatabase* newDB = new CDatabase
newDB->excuteSQL(" sql statment"
now i want to remove all the rows from my table
i tried using
newDB->excuteSQL("truncate table tablename"
this does not work but this compiles but when i run it pop up a box with and (x) but no error statement;
i have no idea whats wrong? do i have to use a Crecordset object instead of CDatabase? i have both Crecordset and Cdatabase in my program i use CDatabase to insert into database and i use Crecordset to retrieve data. i'm not sure what i'm doing wrong?
or is my sql statment wrong? any sugguestions?
thx
i excute sql command by
CDatabase* newDB = new CDatabase
newDB->excuteSQL(" sql statment"
now i want to remove all the rows from my table
i tried using
newDB->excuteSQL("truncate table tablename"
this does not work but this compiles but when i run it pop up a box with and (x) but no error statement;
i have no idea whats wrong? do i have to use a Crecordset object instead of CDatabase? i have both Crecordset and Cdatabase in my program i use CDatabase to insert into database and i use Crecordset to retrieve data. i'm not sure what i'm doing wrong?
or is my sql statment wrong? any sugguestions?
thx