mysql - ExecuteNonQuery Result in C# -


how can know if create database successfully? using "create database demodb" sql command. executenonquery() method returns 0. should use understand if created database successfully?

executenonquery throws mysqlexception exception if there error. returns 0 if successful don't need check return value; if returns has succeeded. example here exception when try create database exists:

can't create database 'name'; database exists


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -