I insert records into the table and when I'm finished with manipulating the data, I need to truncate the table to delete all the records and reset the autonumber field. I want to use the Truncate Table command because one of my SQL columns is an autonumber column.
You can't access a SQL database/table from Javascript client-side in a web browser. You may be able to find an ActiveX control to do this... but that's going to be a solution that will lock out all non-Windows, non-IE users.
Since you have said you are using SQL, why not write a stored procedure that "truncates" the table as part of an "initialisation" process? Be aware, that if you do this, then how will you deal with multiple users performing the task simultaneously?
Thanks for validating my suspicions. I thought there might be a "creative" way to do this and wanted to verify there wasn't. I thought since one could insert and update records into a SQL table one could also truncate the table.
I'll explore using a temp table instead. That might resolve the multiple user issue.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.