Can't open a @#$% .CSV file...

Results 1 to 4 of 4

Thread: Can't open a @#$% .CSV file...

  1. #1
    Marty Blase Guest

    Default Can't open a @#$% .CSV file...

    I&#039m trying to do some simple database experiments with ASP, but since our company&#039s Microsoft Access CD is missing in action I&#039ve been trying to go with .csv files instead. Unfortunately, I keep getting the same errors, and I&#039m not entirely sure why....<BR><BR>Whenever I try to .Open a recordset object, or .Execute a connection object, I get this message back:<BR><BR>[Microsoft][ODBC Text Driver] The Microsoft Jet database engine cannot open the file &#039(unknown)&#039. It is already opened exclusively by another user, or you need permission to view its data. <BR><BR>But I never have the .csv file opened, and I&#039ve already given "read/scripts/execute" permissions to the entire directory they&#039re stored in. There&#039s something elementary missing, I know it, but I can&#039t figure out what.<BR><BR>If it helps, here&#039s the code I&#039m using to identify the .csv file as a database table:<BR><BR>strConnect = "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _<BR> "DefaultDir=C:Inetpubwwwrootcalendardb;" & _<BR> "DBQ=C:Inetpubwwwrootcalendardb\"<BR>dim objRecordset<BR>strSQL = "SELECT * FROM Data"<BR>Set objRecordset = Server.CreateObject("ADODB.Recordset")<BR>objRecor dset.Open strSQL, strConnect, adOpenForwardOnly, adLockReadOnly, adCmdText<BR><BR>...and that last line is what throws the error.<BR><BR><BR>- Marty

  2. #2
    Cable Guest

    Default RE: Can't open a @#$% .CSV file...

    Did you specify a file name?<BR><BR>"DBQ=C:Inetpubwwwrootcalendardb\"<BR> <BR>should be like:<BR><BR>"DBQ=C:Inetpubwwwrootcalendardbdata.c sv"<BR><BR>Or some other file that exists. <BR><BR>Did you try that?

  3. #3
    Marty Blase Guest

    Default RE: Can't open a @#$% .CSV file...

    No, when I do that I get this error instead:<BR><BR>[Microsoft][ODBC Text Driver] &#039(unknown)&#039 is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. <BR><BR>Apparently &#039DBQ&#039 refers to the pseudo-database. Each .csv file is a pseudo-table, and the directory containing them is the pseudo-database. (Right, guys?)<BR><BR><BR>- Marty

  4. #4
    Marty Blase Guest

    Default PROBLEM SOLVED! (was RE: Can't open a @#$% .CS

    Okay, a fellow employee helped me get this working. For anyone who needs to know, here&#039s the changes I had to make:<BR><BR>strConnect = "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _<BR> "DefaultDir=C:Inetpubwwwrootcalendar;" & _<BR> "DBQ=C:Inetpubwwwrootcalendar\" & _<BR><BR>became:<BR><BR>strConnect = "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _<BR> "DefaultDir=C:Inetpubwwwrootcalendar;" & _<BR> "DBQ=C:Inetpubwwwrootcalendar;" & _<BR> "UID=admin; Password="<BR><BR>and:<BR><BR>strSQL = "SELECT * FROM Data"<BR><BR>became:<BR><BR>strSQL = "SELECT * FROM Data.csv"<BR><BR><BR><BR>- Marty


Posting Permissions

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