hi. i'm creating a Database object to connection ms sql server. i'm trying to truncate all my tables in my database. this is my code...
CDatabase* theDb= new CDatabase;
theDb->OpenEx("local=dsn"
char sqlCommand[1000];
sprintf(sqlCommand,"TRUNCATE TABLE STYLES;TRUNCATE TABLE ZONES;TRUNCATE TABLE ROBOTS;TRUNCATE TABLE POINTS;TRUNCATE TABLE GROUPS;TRUNCATE TABLE FUNCTIONS;TRUNCATE TABLE STYLE_INFO;"
theDb->SetQueryTimeout(0);
theDb->ExecuteSQL(sqlCommand);
theDb->Close();
//this works fine but when my tables get too big when i truncate it, it stalls the program i tried setting the timeout to (0) but that just cause it to crash..
help pls?
CDatabase* theDb= new CDatabase;
theDb->OpenEx("local=dsn"
char sqlCommand[1000];
sprintf(sqlCommand,"TRUNCATE TABLE STYLES;TRUNCATE TABLE ZONES;TRUNCATE TABLE ROBOTS;TRUNCATE TABLE POINTS;TRUNCATE TABLE GROUPS;TRUNCATE TABLE FUNCTIONS;TRUNCATE TABLE STYLE_INFO;"
theDb->SetQueryTimeout(0);
theDb->ExecuteSQL(sqlCommand);
theDb->Close();
//this works fine but when my tables get too big when i truncate it, it stalls the program i tried setting the timeout to (0) but that just cause it to crash..
help pls?