How to flush data from Tables?
Currently I am automating a project with Silk Test Tool using VB.Net Scripting.
Currently i am hard coding the configuration values in Test Script.
Some times I need to flush(i mean i need to delete all the data in MySQL DB) data from Data Base from my VB.Net Test Script.
I don't know how to achieve this,Anybody can help in this ?
If possible please provide some sample Code...
Just restore a backup of a clean DB when you need it.
how achieve this using vb.net code?
Originally Posted by Herman
You do it the same way you perform any other interaction with a database, i.e. you create a connection and Open it and then create a command and execute it. In this case the SQL will be a RESTORE DATABASE or the like. That's not a query so you call ExecuteNonQuery. As for the SQL itself, that's not anything to do with VB.NET. You should consult the MySQL documentation for that. As always, make sure that the SQL works in a management tool first.