how can I check to see if a table exist in my database and if it doesn't perform this action, if it does, don't do anything? This is my code and I only want to perform this action once.
VB Code:
'this code modifies the existing database without overwriting user data 'create new table Call CreateConnection(objConn) objConn.Execute "CREATE TABLE TempDocAudio(n_id TEXT(50))" Call CloseConnection(objConn) 'modify Documents and Campaign tables Call CreateConnection(objConn) objConn.Execute "ALTER TABLE Documents ADD COLUMN n_mp3 TEXT(50)" 'cannot use default parameters with ODBC connectivity must switch to OLEDB objConn.Execute "ALTER TABLE Documents ADD COLUMN n_wavBol TEXT(50)DEFAULT FALSE" 'add wespak and defender columns objConn.Execute "ALTER TABLE Campaign ADD COLUMN c_wespakOn TEXT(50)DEFAULT 1" objConn.Execute "ALTER TABLE Campaign ADD COLUMN c_defenderOn TEXT(50)DEFAULT 1" Call CloseConnection(objConn)




Reply With Quote