I am working on my new project and I need to create a table for each user dynamically. In which the user will provide the Table name in the textbox and on pressing Create button a new table gets created in the same MS access database file with the provided name.
Thanks in advance for your help.
here is some not working code which is not helpful to you guy at all:
Con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\test1.mdb" Con.Open() SQL = "CREATE TABLE" + A + "([A Class] number(3))" Cmd = New OleDb.OleDbCommand(SQL, Con) 'DA = New OleDb.OleDbDataAdapter(DT, Con) 'DS.Tables.Add(A) 'DA.Fill(DS, "Tester") 'DT = New DataTable(A) 'Dim TName As DataColumn = New DataColumn("Test1") Cmd.ExecuteNonQuery() DS.Tables.Add(A) DA.Update(DS, A) MsgBox("Table Created")