The program that uses ASP to operate the Access database. (Transfer)

Source: Internet
Author: User
<%
'--- Define DSN names in array
'--- Enter one or more DSN name in the database_list array
Database_list = Array ("Test", "test1 ")
'--- Enable deleting table? -- Carefull !!
StrEnableDeleteTable = False
'---- End declaration
'---- Do not change code below this line ---------------------------------------------
Field_value = Array ("Integer", "Double", "char (255)", "Memo", "Date", "Currency", "YesNo ")
Field_display = Array ("Integer", "Number", "Text", "Memo", "Date/Time", "Currency", "Yes/No ")
Dsn_name = Request ("DatabaseName ")
If Not dsn_name = "" Then
Set con = Server. CreateObject ("ADODB. Connection ")
Con. Provider = "sqloledb"
If dsn_name = "Test" then
ConStr = "Data Source = 127.0.0.1; Initial Catalog = test; User ID = test; Password = 1111"
Else
ConStr = "Data Source = 127.0.0.1; Initial Catalog = test1; User ID = test1; Password = 1111"
End if
Con. Open constr
End If
Table_name = Request ("TableName ")
If Request ("AddNewTable") <> "" Then
If Request ("NewTableName") <> "" Then
SQL = "CREATE TABLE" & Request ("NewTableName") & "(fldAuto Counter )"
Con. Execute (SQL)
End If
End If
If Request ("AddNewField") <> "" Then

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.