I
iDesmet
Hallo,
I'm creating a Wizard in VB.NET. In this wizard I establish the
connection to MySQL and then if it's successful then it creates (if
not exists) a database, tables, amoung others.
The question is, how do I insert data to a table only if it's empty.
Logically if it's not empty, then it shouldn't insert anything. I want
to add this in VB.NET code but don't know how to achive this.
To get the total rows I should use this: SELECT count(*) from db.table
t;
But as I had said, I don't know how to make the wizard know if the
table is empty or not.
Hope somebody can help me on this or show me the way.
Thanks in advance.
Regards,
iDesmet
I'm creating a Wizard in VB.NET. In this wizard I establish the
connection to MySQL and then if it's successful then it creates (if
not exists) a database, tables, amoung others.
The question is, how do I insert data to a table only if it's empty.
Logically if it's not empty, then it shouldn't insert anything. I want
to add this in VB.NET code but don't know how to achive this.
To get the total rows I should use this: SELECT count(*) from db.table
t;
But as I had said, I don't know how to make the wizard know if the
table is empty or not.
Hope somebody can help me on this or show me the way.
Thanks in advance.
Regards,
iDesmet