Professional Web Applications Themes

ADODB.Fields error '800a0bb9' in asp - ASP

Im getting the error ADODB.Fields error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. In the following script to copy and rename the latest file in a webcam folder. Any ideas why this is failing? <% Dim objFSO, rsFSO, objFolder, File, varFileName Set rsFSO = Server.CreateObject("ADODB.Recordset") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder("C:\Doents and Settings\Administrator\My Doents\My Pictures\ImageStudio\Album\Motion Images\") rsFSO.Fields.Append "Name", adVarChar, 200 -----Error occurs on this line. rsFSO.Fields.Append "Type", adVarChar, 200 rsFSO.Fields.Append "DateCreated", adDate rsFSO.Fields.Append "DateLastAccessed", adDate rsFSO.Fields.Append "DateLastModified", adDate rsFSO.Fields.Append "Size", adInteger rsFSO.Fields.Append "TotalFileCount", adInteger rsFSO.Open For ...

  1. #1

    Default ADODB.Fields error '800a0bb9' in asp

    Im getting the error

    ADODB.Fields error '800a0bb9'

    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.

    In the following script to copy and rename the latest file in a webcam
    folder. Any ideas why this is failing?

    <%
    Dim objFSO, rsFSO, objFolder, File, varFileName
    Set rsFSO = Server.CreateObject("ADODB.Recordset")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFolder = objFSO.GetFolder("C:\Doents and
    Settings\Administrator\My Doents\My Pictures\ImageStudio\Album\Motion
    Images\")

    rsFSO.Fields.Append "Name", adVarChar, 200 -----Error occurs on
    this line.
    rsFSO.Fields.Append "Type", adVarChar, 200
    rsFSO.Fields.Append "DateCreated", adDate
    rsFSO.Fields.Append "DateLastAccessed", adDate
    rsFSO.Fields.Append "DateLastModified", adDate
    rsFSO.Fields.Append "Size", adInteger
    rsFSO.Fields.Append "TotalFileCount", adInteger
    rsFSO.Open

    For Each File In objFolder.Files
    'hide any file that begins with the character to exclude
    If (Left(File.Name, 1)) <> Exclude Then
    rsFSO.AddNew
    rsFSO("Name") = File.Name
    rsFSO("Type") = File.Type
    rsFSO("DateCreated") = File.DateCreated
    rsFSO("DateLastAccessed") = File.DateLastAccessed
    rsFSO("DateLastModified") = File.DateLastModified
    rsFSO("Size") = File.Size
    rsFSO.Update
    End If
    Next

    rsFSO.Sort = "DateLastModified"

    Set objFolder = Nothing
    rsFSO.MoveFirst()
    set varFileName = rsFSO("Name").Value

    objFSO.CopyFile "C:\Doents and Settings\Administrator\My Doents\My
    Pictures\ImageStudio\Album\Motion Images\" & varFileName,
    "C:\Inetpub\Scripts\Webcam\Images\CurrentImage.jpg "
    %>

    <img src="\images\CurrentImage.jpg">

    Thanks in advance.

    --
    _______________________________________________

    DC

    "You can not reason a man out of a position he did not reach through reason"

    "Don't use a big word where a diminutive one will suffice."

    "A man with a watch knows what time it is. A man with two watches is
    never sure." Segal's Law

    DC Guest

  2. #2

    Default Re: ADODB.Fields error '800a0bb9' in asp

    Your server doesn't know what an adVarChar is

    [url]http://www.aspfaq.com/show.asp?id=2112[/url]

    [url]http://www.aspfaq.com/show.asp?id=2102[/url]


    "DC" <sws99dscrdg.ac.uk> wrote in message
    news:3F5F4558.2050203rdg.ac.uk...
    > Im getting the error
    >
    > ADODB.Fields error '800a0bb9'
    >
    > Arguments are of the wrong type, are out of acceptable range, or are in
    > conflict with one another.
    >
    > In the following script to copy and rename the latest file in a webcam
    > folder. Any ideas why this is failing?
    >
    > <%
    > Dim objFSO, rsFSO, objFolder, File, varFileName
    > Set rsFSO = Server.CreateObject("ADODB.Recordset")
    > Set objFSO = CreateObject("Scripting.FileSystemObject")
    > Set objFolder = objFSO.GetFolder("C:\Doents and
    > Settings\Administrator\My Doents\My Pictures\ImageStudio\Album\Motion
    > Images\")
    >
    > rsFSO.Fields.Append "Name", adVarChar, 200 -----Error occurs on
    > this line.
    > rsFSO.Fields.Append "Type", adVarChar, 200
    > rsFSO.Fields.Append "DateCreated", adDate
    > rsFSO.Fields.Append "DateLastAccessed", adDate
    > rsFSO.Fields.Append "DateLastModified", adDate
    > rsFSO.Fields.Append "Size", adInteger
    > rsFSO.Fields.Append "TotalFileCount", adInteger
    > rsFSO.Open
    >
    > For Each File In objFolder.Files
    > 'hide any file that begins with the character to exclude
    > If (Left(File.Name, 1)) <> Exclude Then
    > rsFSO.AddNew
    > rsFSO("Name") = File.Name
    > rsFSO("Type") = File.Type
    > rsFSO("DateCreated") = File.DateCreated
    > rsFSO("DateLastAccessed") = File.DateLastAccessed
    > rsFSO("DateLastModified") = File.DateLastModified
    > rsFSO("Size") = File.Size
    > rsFSO.Update
    > End If
    > Next
    >
    > rsFSO.Sort = "DateLastModified"
    >
    > Set objFolder = Nothing
    > rsFSO.MoveFirst()
    > set varFileName = rsFSO("Name").Value
    >
    > objFSO.CopyFile "C:\Doents and Settings\Administrator\My Doents\My
    > Pictures\ImageStudio\Album\Motion Images\" & varFileName,
    > "C:\Inetpub\Scripts\Webcam\Images\CurrentImage.jpg "
    > %>
    >
    > <img src="\images\CurrentImage.jpg">
    >
    > Thanks in advance.
    >
    > --
    > _______________________________________________
    >
    > DC
    >
    > "You can not reason a man out of a position he did not reach through
    reason"
    >
    > "Don't use a big word where a diminutive one will suffice."
    >
    > "A man with a watch knows what time it is. A man with two watches is
    > never sure." Segal's Law
    >

    Tom B Guest

Similar Threads

  1. Replies: 1
    Last Post: November 29th, 07:17 PM
  2. Help with ADODB.Recordset Error (0x800A0BB9)
    By Nick D. in forum ASP Database
    Replies: 6
    Last Post: May 2nd, 09:38 PM
  3. Object Reference Error on ADODB.RecordSet Fields
    By Donald Welker in forum ASP Database
    Replies: 1
    Last Post: October 3rd, 09:10 PM
  4. #25481 [Opn->Bgs]: ADOdb -> fields error
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: September 11th, 12:29 AM
  5. ADODB.Field error '80020009
    By olivier Micheli in forum ASP
    Replies: 0
    Last Post: August 15th, 07:43 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139