I got the following article from www.15seconds.com or 4Guys, I believe. <BR><BR>I followed its instruction and I was able to connect to text-delimited database files on the fly on the PC at WORK. Then I tried to do the same thing at work, the same code would not work. Other ASP codes work. It seems my system chokes on the database connection stuff. The IE5 just keeps on spinning. What should I do?<BR><BR>Timothy<BR><BR>(article attached)<BR><BR>Connecting to Text-Delimited Database Files on the Fly<BR>By Abd Shomad <BR><BR>-----------------------------------------------------------------<BR><BR>This article is a follow up to Abd&#039s article, "On the Fly Connection for MS Access DB." <BR>Text Delimited Database files are files that have each column separated by a specified delimiter (a comma, semicolon, etc.), and each separate row specified by a new line character. In Excel or Access you can save your tables as comma delimited files. A comma delimited file is an example of a text delimited file. This article will show you how to connect to CSV (Text Delimited) Database files on the fly. <BR><BR>--------------------------------------------------------------------------------<BR><BR>Connecting CSV (Text Delimiter) Database On The Fly: <BR>What do you have to do to make this code work: <BR><BR>1. Create virtual directory having script permission<BR>2. Create a "Microsoft Text Driver" file DSN from your ODBC32 from Control Panel. Name it "CSV.DSN" (see appendix A) or Copy and paste the text from appendix A<BR>3. Save sample data below to "data.txt" (see appendix B)<BR>4. Save this article as "AnyName.asp"<BR>5. Copy all the three files ("csv.dsn", "data.txt", and "AnyName.asp") on your virtual directory having execute script permission that you&#039ve just created.<BR>6. Browse this application from your browser.<BR><BR>================================== ========<BR>Appendix A: If you were too lazy to create your file DSN from the Control Panel, Copy & Paste the text below, and save it as "CSV.DSN" <BR><BR>==== beginning of file "CSV.DSN"===<BR>[ODBC]<BR>DRIVER=Microsoft Text Driver (*.txt; *.csv)<BR>UID=admin<BR>UserCommitSync=Yes<BR>Threa ds=3<BR>SafeTransactions=0<BR>PageTimeout=5<BR>Max ScanRows=25<BR>MaxBufferSize=512<BR>ImplicitCommit Sync=Yes<BR>FIL=text<BR>Extensions=txt,csv,tab,asc <BR>DriverId=27<BR>=== end of file "CSV.DSN" ===<BR>==========================================< BR>Appendix B: Sample data file, save as "data.txt" <BR><BR><BR>==== beginning of sample data file ===<BR>ID,Name,Price<BR>1,"Chairs",$40.00<BR>2,"Ta ble",$75.00<BR>3,"Fork",$1.50<BR>4,"Lamp",$15.00<B R>5,"Rug",$35.00<BR>=== end of file ===<BR>Now, we will connect this database on the fly! Look at the code below! Copy and save it as "AnyName.asp" <BR><BR>=== These lines below are the working code. === <BR><BR>&#060;html&#062;<BR>&#060;body&#062;<BR><B R>&#060;%<BR>&#039 Note that the differences between MDB file and other<BR>&#039 file based database is that MDB file need to have the<BR>&#039 *** file name ("anyfile.mdb") *** as the DBQ value.<BR>&#039 Other databases, such as Comma Delimited (CSV), <BR>&#039 FoxPro (DBF), Paradox (DB) use their respective<BR>&#039 *** DIRECTORY NAME *** as the DBQ value.<BR><BR>&#039 Be sure to not how we specify the DBQ as the<BR>&#039 directory name, NOT as the .txt filename!<BR>&#039 This variable will hold the name of our DSN file<BR>Dim sDSNFile<BR>sDSNFile = "CSV.dsn"<BR><BR>&#039 Let&#039s now dynamically retrieve the current directory<BR>Dim sScriptDir<BR>sScriptDir = Request.ServerVariables("SCRIPT_NAME")<BR>sScriptD ir = StrReverse(sScriptDir)<BR>sScriptDir = Mid(sScriptDir, InStr(1, sScriptDir, "/"))<BR>sScriptDir = StrReverse(sScriptDir)<BR><BR>&#039 Time to construct our dynamic DSN<BR>Dim sPath, sDSN<BR>sPath = Server.MapPath(sScriptDir) & "\"<BR>sDSN = "FileDSN=" & sPath & sDSNFile & _<BR>";DefaultDir=" & sPath & _<BR>";DBQ=" & sPath & ";"<BR><BR>&#039 sDSN might now look like:<BR>&#039 FileDSN=C:InetpubwwwrootCSV.DSN;DefaultDir=<BR>&#0 39 C:Inetpubwwwroot;DBQ=C:Inetpubwwwroot;<BR><BR>&#03 9 Building Data Connection<BR>Dim Conn, rs<BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en sDSN<BR><BR>&#039 Get only the Name and Price fields<BR>Dim sql<BR>sql = "SELECT Name,Price FROM data.txt"<BR><BR>&#039Implicitly create a recordset object with the<BR>&#039results of this query<BR>set rs = conn.execute(sql)<BR><BR><BR>&#039Print out the contents of our recordset<BR>Do WHile Not rs.EOF<BR>Response.Write "Name: " & rs("Name")<BR>Response.Write "<BR>Price: " & rs("Price")<BR>Response.Write "&#060;HR&#062;"<BR><BR>rs.MoveNext &#039Move to the next record<BR>Loop<BR><BR><BR>&#039Close our recordset and connection<BR>rs.close<BR>set rs = nothing<BR>conn.close<BR>set conn = nothing<BR>%&#062;<BR><BR>&#060;body&#062;<BR>&#06 0;/html&#062;<BR>Happy Scripting!!! <BR><BR>-----------------------------------------------------------------<BR><BR>This article was written by Abd Shomad, currently a student of School of Telecommunication Technology (STTTelkom) Bandung, Indonesia. Abd is involved in many research projects on Internet related science and often leads some real work teams during his studies. <BR>