The following articles mainly introduce how to clear the code of MySQLSQL database _ php to clear mysql asp. This article mainly describes detailed analysis of access or mssql: 34asp code, I hope it will help you in this regard.
Copy the Code as follows:
- <%
- Dim Rs,Conn
- Set Conn=Server.CreateObject("Adodb.Connection")
- Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("readlog.mdb")
- Set Rs=Conn.OpenSchema(20)
- Do While not Rs.Eof
- If Ucase(Rs("TABLE_TYPE"))="TABLE" Then '
For user tables
- Conn. Execute ("Drop Table" & Rs ("TABLE_NAME ")&"")
- End If
- Rs. MoveNext
- Loop
- Response. Write "successful! "
- Rs. Close
- Set Rs = Nothing
- Conn. Close
- Set Conn = Nothing
- %>
Php clears mysql
MySQLSQL database; copy the Code as follows:
- <? Php
- $ User = "readlog.cn"; // account
- $ Password = "readlog.cn"; // password
- $ Dbname = "readlog"; // Database
- $ Link = mysql_connect ("localhost: 3306", $ user, $ password );
- Mysql_select_db ("$ dbname", $ link );
- Echo "<p> clearing database ...";
- $ Result = mysql_query ("SHOW tables", $ link );
- While ($ currow = mysql_fetch_array ($ result ));
- Mysql_query ("drop table if exists $ currow [0]");
- Echo "successful! ";
- ?>
Asp clear mssql
Copy the Code as follows:
- <%
- Dim Rs, Conn
- Set Conn = Server. CreateObject ("Adodb. Connection ")
- Conn. Open "Provider = Sqloledb; User ID = readlog.cn; Password = readlog.cn; Initial Catalog = readlog; Data Source = (local );"
- Set Rs = Conn. Execute ("Select name from sysobjects Where xtype = char (85) order by id ")
- Do While Not Rs. Eof
- Conn. Execute ("drop table" & rs (0 )&"")
- Rs. movenext
- Loop
- Response. Write "successful! "
- Rs. Close
- Set Rs = Nothing
- Conn. Close
- Set Conn = Nothing
- %>
The above content is an introduction to clearing the code of the MySQLSQL database.