Why do you want different approaches? If there's an approach that works then why do you need more?
The question really comes down to what database and ADO.NET provider you're using. Some providers support multiple SQL statements while some do not. For example, SqlClient will allow you to include multiple SQL statements separated by semicolons in a single CommandText. OleDb with the Jet OLE DB provider for Access will not, so you'd just have to use multiple commands.
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.