while creation atable in sql server db i have the following eror
this is my code
try
{
SqlConnection sc=
sc.ConnectionString=str;
SqlCommand smd=
smd.CommandText="create table " + textBox1 .Text + "(dd int not null , ss nvarchar(10)) ";
smd.Connection=sc;
sc.Open();
MessageBox.Show("1");
}
MessageBox.Show(ex.Message);
the error is the following
object reference not set to an instance object
please help me