Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/08/2005, 10:19
Avatar de Saruman
Saruman
 
Fecha de Ingreso: mayo-2003
Ubicación: Panama city, Panama, Panama
Mensajes: 1.154
Antigüedad: 22 años
Puntos: 5
ya la tengo:

Código:
 
Public Function TableExists(dbname, tableToFind)
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;data source=" 
ConnStr = ConnStr & server.mappath(dbname) 
 
set adoxConn = CreateObject("ADOX.Catalog") 
set adodbConn = CreateObject("ADODB.Connection") 
adodbConn.open ConnStr 
adoxConn.activeConnection = adodbConn 
found = false 
for each table in adoxConn.tables 
if lcase(table.name) = lcase(tableToFind) then 
	found = true 
	exit for 
end if 
next
 
if found = false then
sSQL = "CREATE TABLE " & tableToFind & " (id_email AUTOINCREMENT PRIMARY KEY, envios TEXT(200))"
adodbConn.Execute(sSQL)
end if
 
adodbConn.close: set adodbConn = nothing 
set adoxConn = nothing
end function
referencia: http://www.aspfaq.com/show.asp?id=2350
__________________
Saruman

One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them.

Última edición por Saruman; 29/08/2005 a las 10:37