D
David Smith
I want to add a table in my ms access database at runtime. through Vb.NET.
any ideas?
any ideas?
David Smith said:I want to add a table in my ms access database at runtime. through
Vb.NET. any ideas?
any ideas?I want to add a table in my ms access database at runtime. through Vb.NET.
* "David Smith said:I want to add a table in my ms access database at runtime. through Vb.NET.
any ideas?
You can try this
\\
Dim conn1 As OleDb.OleDbConnection = New OleDb.OleDbConnection
conn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\test1\db.mdb;User Id=admin;Password=;"
conn1.Open()
Dim cmdA As New OleDb.OleDbCommand( _
"CREATE TABLE Herfried (n1 char(50) NOT NULL," & _
"n2 Char(20)," & _
"n3 Char(20)," & _
"n4 Char(20)," & _
"n5 Char(20)," & _
"CONSTRAINT [pk_n1] PRIMARY KEY (n1))", conn1)
cmdA.ExecuteNonQuery()
///
* "Cor said:Tip of the day 2 ,
Try this