How to flush data from Tables?

Joined
Jul 12, 2012
Messages
6
Programming Experience
1-3
Hi All,
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...
Thanks,
Rajendra
 
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.
 
Back
Top