Hi everyone.
How to create Tables in MSACCESS via .NET Code.
I want to create a table with structure based on existing table.
A table which is already present in MS Access database.
Not like this
Dim Cmd As OleDbCommand
Dim SQL As String
Dim objCmd As New OleDbCommand
Dim Con = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;data source=" & Database & "")
SQL = "CREATE TABLE tbCatalogue ([Id] COUNTER, [Stock Code] TEXT(10), [Account Number] TEXT(6))"
Cmd = New OleDbCommand(SQL, Con)
Con.Open()
objCmd = New OleDbCommand(SQL, Con)
objCmd.ExecuteNonQuery()
Con.Close()
Basically
I need to find a substitute of the command
SET newTable=CurrentDb.CreateTableDef("Tablename")
in ADO.NET
Thanks in Advance.!
How to create Tables in MSACCESS via .NET Code.
I want to create a table with structure based on existing table.
A table which is already present in MS Access database.
Not like this
Dim Cmd As OleDbCommand
Dim SQL As String
Dim objCmd As New OleDbCommand
Dim Con = New OleDbConnection("Provider=Microsoft.Jet.OleDb.4.0;data source=" & Database & "")
SQL = "CREATE TABLE tbCatalogue ([Id] COUNTER, [Stock Code] TEXT(10), [Account Number] TEXT(6))"
Cmd = New OleDbCommand(SQL, Con)
Con.Open()
objCmd = New OleDbCommand(SQL, Con)
objCmd.ExecuteNonQuery()
Con.Close()
Basically
I need to find a substitute of the command
SET newTable=CurrentDb.CreateTableDef("Tablename")
in ADO.NET
Thanks in Advance.!