Driver = {Microsoft text Driver (*. txt; *. CSV)

Source: Internet
Author: User

The server cannot call driver = {Microsoft text Driver (*. txt; *. CSV)}. After checking for several hours, it is found that the driver called by ASP requires an Internet Guest Account (iusr_xxx)List folder DirectoriesPermission. It is strange that only the iusr_xxx permission is required to call driver Microsoft Access driver. MDB.Read/writePermission.

< %
Dim Conn, RS
Set Conn = Server. Createobject ( " ADODB. Connection " )
' Set the DBQ portion of the string to the physical folder where your price files reside
Conn. Open " Driver = {Microsoft text Driver (*. txt; *. CSV )}; "   & _
" DBQ = D: \ WEB \ Web; "   & _ ' I personally think the problem is that he needs to list the files first, and we call the MDB path to write dead, so as long as the MDB file is opened, instead of going through the folder
" Extensions = ASC, CSV, tab, txt; "   & _
" Persist Security info = false "
Dim SQL
SQL =   " Select * From web.csv "
' (Implicit recordset creation through execute method)
Set RS = Conn.exe cute (SQL)
Response. Write " <Table> <tr bgcolor = lightgrey> <TH> item No. </Th> <TH> item name </Th> <TH> item short name </Th> <TH> unit </Th> <TH> product Points </Th> </tr> "
While   Not Rs. EOF
' Here we have stock price text file in format: date high low close volume
Response. Write " <Tr bgcolor = lightblue> <TD> "   & RS ( 0 ) &   " </TD> <TD> "   & RS ( 1 )_
&   " </TD> <TD> "   & RS ( 2 ) &   " </TD> <TD> "   & RS ( 3 ) &   " </TD> <TD> "   & RS ( 4 ) &   " </TD> </tr> "
Rs. movenext
Wend
Response. Write " </Table> "
Rs. Close
Set RS =   Nothing
Conn. Close
Set Conn =   Nothing
% >

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.