Table exists in .MDB using VB.NET?
Posted on 2003-11-12
Hi, I am using VB.NET and need to find out if a table exists before I create it in my .MDB (Access 2002) database. I cannot use an "if exists" statement against an Access database, so need some other way to determine if the table already exists. An alternative is to generate a list of tables that are in the database but I do not know how to do this either using VB.NET.
I am using the following:
sqlSTR = "SELECT * INTO MatchedWords" & docCount.ToString & " FROM MatchedWords"
Dim selectIntoCMD As OleDb.OleDbCommand = New OleDb.OleDbCommand(sqlSTR, conn)
Dim recordsAffected As Int32
recordsAffected = selectIntoCMD.ExecuteNonQuery
Any help appreciated,