469,306 Members | 1,881 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

ADODB.Fields error '800a0bb9' in asp

DC
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:\Documents and
Settings\Administrator\My Documents\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:\Documents and Settings\Administrator\My Documents\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

Jul 19 '05 #1
1 9810
Your server doesn't know what an adVarChar is

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

http://www.aspfaq.com/show.asp?id=2102
"DC" <sw******@rdg.ac.uk> wrote in message
news:3F**************@rdg.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:\Documents and
Settings\Administrator\My Documents\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:\Documents and Settings\Administrator\My Documents\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

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dot Netizen | last post: by
2 posts views Thread by wolverine1654 | last post: by
3 posts views Thread by Yuk Tang | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.