con.Open() Dim dbSchema As DataTable = con.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, TextBox1.Text, "TABLE"}) con.Close() If dbSchema.Rows.Count > 0 Then MsgBox("Table Exist") Else Dim cmd As New OleDb.OleDbCommand("CREATE TABLE [" + TextBox1.Text + "] ([Field1] TEXT(10), [Field2] TEXT(10))", con) con.Open() cmd.ExecuteNonQuery() MessageBox.Show("Table Created Successfully") con.Close() End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)