Re: ADO Error ( think)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Val Mazur (group51a_at_hotmail.com)
Date: 07/02/04


Date: Thu, 1 Jul 2004 22:35:08 -0400

Hi,

When you open connection do you specify file name in a path as well? If yes,
then it is not correct, because you should specify only folder name, without
the file name. When you open connection it treats folder as a database, but
later on you use SELECT SQL statement to select actual data from the file

-- 
Val Mazur
Microsoft MVP
"Willie Bodger" <willie@bodgerfam.com> wrote in message 
news:OMdfGB8XEHA.1000@TK2MSFTNGP12.phx.gbl...
> Hmm Thank you, that got me past that error. Now something odd is 
> happening.
> I'm uploading a file via ASPUpload, then using the intrinsic properties
> there to identify the location of the file for the ADO call, but it is
> saying the file is not at that location, although it is at that location. 
> I
> am running XP Pro with IIS installed so I can do everything locally, 
> except
> my database is not local. However, isn't this just a local call? Well,
> here's the code and the error: Thanks for any other info you can help me
> with. wb
>
> Dim Upload
> Set Upload = Server.CreateObject("Persits.Upload.1")
> Upload.Save "c:\upload"
> For Each File in Upload.Files
>    filepath= File.Path
> Next
> Response.Write filepath
> 'Response.End
>
> ' Create the connection object
> Dim cnn, strConn, rs
> Set cnn = Server.CreateObject("ADODB.Connection") ' build the connection
> string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & 
> filepath
> & ";Extended Properties=""text;HDR=Yes;FMT=Delimited""" cnn.Open strConn
> 'open the connection  (THIS IS line 20)
>
> Error Type:
> Microsoft JET Database Engine (0x80004005)
> 'c:\upload\tSerialNumbers.csv' 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.
> /adoparse.asp, line 20
>
> "Val Mazur" <group51a@hotmail.com> wrote in message
> news:ecIQtR6XEHA.2016@TK2MSFTNGP11.phx.gbl...
>> Hi,
>>
>> try to use next connection string
>>
>> Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filepath & ";Extended
>> Properties=""text;HDR=Yes;FMT=Delimited"""
>>
>> -- 
>> Val Mazur
>> Microsoft MVP
>>
>>
>> "Willie Bodger" <willie@bodgerfam.com> wrote in message
>> news:eARc3p5XEHA.3476@tk2msftngp13.phx.gbl...
>> > Ok, I am trying to deal with an uploaded CSV file that I want to place
> the
>> > values of into my database along with one other column that will be
> passed
>> > via the form and will be the same for all the values from that
> particular
>> > csv (which has only one field). In an effort to avoid Bulk Insert, I
> began
>> > poking around and found this possible ADO solution to read it into a
>> > recordset:
>> > Dim cnn, strConn, rs Set cnn = Server.CreateObject("ADODB.Connection")
>> > (Line 20) strConn = "Driver={Microsoft Text Driver (*.txt; *.csv)};
>> > DEFAULTDIR=" & filepath & "; Extensions=csv; Persist Security
> Info=False"
>> > cnn.Open strConn 'open the connection
>> > But when I try it I get the error below. I have isolated everything 
>> > else
>> > and
>> > this is the piece that breaks, but I'm really not that well versed in
> ADO,
>> > so any help you all could provide me would be greatly appreciated.
>> >
>> > wb
>> >  a.. Error Type:
>> >  Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
>> >  [Microsoft][ODBC Text Driver]General error Unable to open registry key
>> > 'Temporary (volatile) Jet DSN for process 0x838 Thread 0xd38 DBC
> 0x10d5904
>> > Text'.
>> >  /adoparse.asp, line 20
>> >
>> >
>> >  b.. Browser Type:
>> >  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
>> >
>> >  c.. Page:
>> >  POST 542 bytes to /adoparse.asp
>> >
>> >  d.. POST Data:
>> >  error '80020009'
>> >  Exception occurred.
>> >
>> >  /iisHelp/common/500-100.asp, line 223
>> >
>> >
>>
>>
>
> 


Relevant Pages

  • Re: inserting images into mysql database using matlab
    ... I would like to know how to insert images into mysql database and how to retrieve and display the inserted images. ... // declare a connection by using Connection interface Connection connection = null; ... /*declare a resultSet that works as a table resulted by execute a specified sql query. ... System.out.println("unsucessfull to upload image."); ...
    (comp.soft-sys.matlab)
  • Re: inserting images into mysql database using matlab
    ... First create database named 'anju' by query given below: ... // declare a connection by using Connection interface ... /* executeUpdate() method execute specified sql query. ... System.out.println("unsucessfull to upload image."); ...
    (comp.soft-sys.matlab)
  • Re: ADO Error ( think)
    ... Dim Upload ... ' Create the connection object ... Microsoft JET Database Engine ... 'c:\upload\tSerialNumbers.csv' is not a valid path. ...
    (microsoft.public.data.ado)
  • Re: How to switch databases using ADO.NET?
    ... an open connection before it will work. ... the ChangeDatabase method of the SqlConnection if you're using SqlServer ... ASP.NET project) to allow our developers to select a database name from ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How are .ldb files unloaded
    ... Here is my connection string. ... still persisting either an open connection OR there is some problem ... database which keeps it extant at the time that I am trying to run my ... under the context of the last user to exit the database. ...
    (microsoft.public.data.ado)