error in text files as database

Results 1 to 2 of 2

Thread: error in text files as database

  1. #1
    Join Date
    Dec 1969

    Default error in text files as database

    i am accesing text files as datbase . i m having text file named data stored<BR>in dir named my dir at my desktop. The file data.txt contains<BR>ID,Name,Price<BR>1,"Chairs",$40.00<BR> 2,"Table",$75.00<BR>3,"Fork",$1.50<BR>4,"Lamp",$15 .00<BR>5,"Rug",$35.00<BR> <BR><BR>when i run this asp page i get an error messege<BR>Data source name not found and no default driver specified<BR>please tell me where i have mistaken?<BR><BR>&#060;%@ language=vbscript %&#062;<BR>&#060;% option explicit %&#062;<BR>&#060;!--#include virtual="/"--&#062;<BR>&#060;%<BR> dim objconn,objrs<BR> set objconn=server.createobject("adodb.connection")<BR > objconn.connectionstring="defaultdir=E:Documents and SettingsRaviDesktopmy dir;driver=microsoft text driver(*.txt;*.csv)"<BR><BR> set objrs=server.createobject("adodb.recordset")<BR> "data.txt",objconn, , ,adcmdtext<BR> do while not objrs.eof<BR> response.write objrs("ID") & "<BR>"<BR> response.write objrs("Name") &"<BR>"<BR> response.write objrs("Price") & "<BR>&#060;hr&#062;"<BR> objrs.movenext<BR> loop<BR> objrs.close<BR> set objrs=nothing<BR> objconn.close<BR> set objconn=nothing<BR> %&#062;

  2. #2
    Join Date
    Dec 1969

    Default Why did you start a ..

    .. new thread?! Stick with your original.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts