To create a table in an Access database through ASP

Source: Internet
Author: User
Tags access database
At some point, we need to create a table in an Access database and not necessarily have to change the database to upload it, let me briefly explain the method below.
<%
' first set up a database file
Set Conn=server.createobject ("Adox.catalog")
Conn.create "Provider=Microsoft.Jet.OLEDB.4.0" & "Data source=" & Server.MapPath ("Name of database. mdb")
%>
<%
' Create the table in the database
Set Rs=server.createobject ("Adox.table")
' The form name
Rs.name= "Adminis1"
' The table field (see Related Appendix for field type)
Rs.columns.append "Liuyan", 203
Rs.columns.append "DT", 7
Conn.tables.append RS
Set rs=nothing
%>
At this point, the form is complete. Hope to be helpful to you.
Field type Appendix
203 Notes
Date of 7th/time
1282 in-system
11 Boolean
6 currency
133 Date
134 Times
135 Date and time
5 Double Precision
4 Single Precision
2042 in-system
202 string
This appendix includes insufficiently comprehensive, hoped everybody can give the supplement!

Related Article

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.