- SQL Server 2005
I am making up a code that does the following
#1: Creates Database
#2: Creates Tables.
OK, the database part works great.
The Table part, gives me the Subject Title Error:
Microsoft OLE DB Provider for SQL Server error '80040e14'
There is already an object named 'MyTable' in the database.
/Populate.asp, line 25
This is my full code that I am using.
Can someone please let me know what is needed to make this work?
set conn = CreateObject("ADODB.Connection")
conn.open "Provider=SQLOLEDB;Data Source=server-name;User ID=myUN;Password=********;"
sql = "CREATE DATABASE MyDatabase"
conn.execute sql, , 129
if not tableExists then
tableCreate = "CREATE TABLE Mytable(" & _
"IDColumn INT not null," & _
"IntegerColumn INT," & _
"VarcharColumn VARCHAR(50)," & _
conn.execute tableCreate, , 129
set conn = nothing