problem with creating table
im trying to create a table with the code below. However it says the table already exists. I've tried to create a bnew database and delete all the table but it still says the table already exists. on checking the db the table does exist but how do i stop the code going back andtrying to create another table thanks
Dim conADO As ADODB.ConnectionClass = New ADODB.ConnectionClass
Dim strSQL As String
Dim tableN As String
tableN = Surname & Name.Substring(0, 1)
conADO.Open("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source='Y:\Copy of eplanet\dbUsers.mdb'", Nothing, Nothing, 0)
strSQL = "CREATE TABLE " & tableN & " (UserN string, QuesNo Integer1, " & _
"QuesCat string,userAns string,correctAns string,Result string,Score Integer1,DateOfTest string);"
conADO.Execute(strSQL, 0, 0)
conADO.Close()
|