Hola, quiero saber cual es el código para crear tablas en access y crear columas en las tablas, que se cree desde una página de asp.
Giancarlo Loret de Mola (Mamon)
| |||
Re: crear en access Aca va mamon: conn.Execute("CREATE TABLE MiTabla (Codigo INTEGER, Nombre TEXT(30), Fecha DATETIME)") Otros tipos de datos pueden ser LONG,DECIMAL,MONEY,IMAGE,BINARY,BIT...etc ![]() bye ![]() |
| ||||
ya la tengo:
Código:
referencia: http://www.aspfaq.com/show.asp?id=2350 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
__________________ 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 |
| ||||
Cita: si jejejejee lo que pasa es que hice una busqueda y encontre tu post y no quise hacer uno nuevo sino que utilice este viegiiiisssiiimoooooo para solicitar lo que neceistaba... pero NADIE me respondio... puedes creerlo??
Iniciado por mamon Asu!! Este Mensaje Lo Puse En El 2002! Jajjaja ![]()
__________________ Saruman One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them. |