Salve a tutti.
Ho bisogno di verificare l'esistenza di una tabella e se non esiste la devo creare. il secondo passaggio (creare la tabella è ok.), ma il primo passaggio mi da dei problemi.
Ho letto che è possibile verificare l'esistenza di una tabella in questo modo:
ma mi viene restituito il seguente errore:Codice PHP:function tableexist(tableToFind,dbname)
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;data source="
ConnStr = ConnStr & server.mappath(dbname)
set adodbConn = CreateObject("ADODB.Connection")
adodbConn.open ConnStr
sql = "SELECT COUNT(*) FROM MSYSObjects WHERE Type = 1" & _
" AND [Name]='" & tableToFind & "'"
set rs = adodbConn.Execute(sql)
found = rs(0)
if found then
tableexist = true
else
tableexist = false
end if
end function
dove line 8 è: set rs = adodbConn.Execute(sql)Microsoft JET Database Engine error '80040e09'
Record(s) cannot be read; no read permission on 'MSYSObjects'.
nomefile.asp, line 8
Come mai?

Rispondi quotando