Do you feel satisfied with the database designed? Do you believe that you should do it again? For example, a newly established database table, such as establishing or modifying a field ... Of course, these are the columns of design databases. So, is your normal operation not to download the database to this unit, then open it, then go up and upload it? Shicone is so -_-! Now, you can contact this information about this, after all, the function of the code is to save a lot of time for manual operation. However, the generation of code is not manual? Oh: 1, build database files cnbruce.mdb (do not design any table) Code code:
<% OPTION Explicit Dim DatabaseName 'Defines Database Name DatabaseName = "CNBRUCE.MDB" Database Name DIM DatabasePath' Defines Data Stock Path DatabasePath = "E: / CNBRUCE / DATABASE /" Database absolute path DIM DATABASEVER 'Define Database version 2000 or 97 Databasever = "2000" Function CreatedFile (FilePath, FileName, Ver) DIM CNBRUCE, DBVER SELECT CASE VER CAS "97" DBVER = "3.51" Case "2000" DBVER = "4.0" End Select if DBVER <> "" THEN SET cnbruce = Server.CreateObject ( "ADOX.Catalog") call cnbruce.Create (& dbver & "Provider = Microsoft.Jet.OLEDB." "; Data Source =" & filepath & filename) end if End Function Call Createdfile (databasepath, DatabaseName, DatabaseVer) 'Creating Database%> So, then how to design a new database table 2, build a database connection file Conn.asp
<% db_path = "cnbruce.mdb" set conn = server.createObject ("adoDb.connection") connStr = "provider = microsoft.jet.Oledb.4.0; data source =" & server.mappath (db_path) conn.Open ConnStr% > 3, create a new database table program page AddTable.asp