|
 |
asp_databases thread: Multiple-step OLE DB operation generated errors
Message #1 by "Buddie" <buddie84@h...> on Mon, 25 Jun 2001 16:01:07 +0900
|
|
Hi
iam facing a problem while trying to get the contents from a BLOB
field.
The BLOB field "file" containing image/text files.
It is getting fine through query analyzer.
The connection string is working for other operations
the error occuring in "GetChunk(size)"method.
iam using informix database
Version Informix Dynamic Server -2000 for Win NT
Set conAdoDB =3D Server.CreateObject("ADODB.Connection")
conAdoDB.Open("DSN=3Dcsdb;UID=3Dinformix;PWD=3Dinformix;")
Set oRs =3D Server.CreateObject("ADODB.Recordset")
qry=3D "select file from t_qa where no=3D"&messid 'file is a BLOB field
oRs.Open qry, conAdoDB,adOpenStatic,adLockOptimistic
If Not oRs.BOF And Not oRs.EOF Then
Dim BlobSize
BlobSize =3D oRs("file").ActualSize
Response.Write BlobSize ''its printing as 72
if BlobSize>0 then
ByteF =3D oRs("file").GetChunk(BlobSize) 'error occuring
here
End If
End If
The error message is like
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.
/csdb/qna/filedownload.asp, line 375
Does anyone of you know how to
solve this
best regards
Sagar
Message #2 by "kaustubh chaporkar" <chaporkar@h...> on Mon, 25 Jun 2001 07:14:14 -0000
|
|
Hi
i also faced this problem
The reason i was getting error was field overflow.
U r trying to insert more then the maximum of that field
so u get 80040e21 error which is an ODBC Error.
There might be some other reasons ...
pls check if this works and let me know.
by
kaus
U r using a
>From: "Buddie" <buddie84@h...>
>Reply-To: "ASP Databases" <asp_databases@p...>
>To: "ASP Databases" <asp_databases@p...>
>Subject: [asp_databases] Multiple-step OLE DB operation generated errors
>Date: Mon, 25 Jun 2001 16:01:07 +0900
>
>Hi
>iam facing a problem while trying to get the contents from a BLOB
>field.
>The BLOB field "file" containing image/text files.
>It is getting fine through query analyzer.
>The connection string is working for other operations
>the error occuring in "GetChunk(size)"method.
>iam using informix database
>Version Informix Dynamic Server -2000 for Win NT
>
>
>
>
>Set conAdoDB =3D Server.CreateObject("ADODB.Connection")
>conAdoDB.Open("DSN=3Dcsdb;UID=3Dinformix;PWD=3Dinformix;")
>Set oRs =3D Server.CreateObject("ADODB.Recordset")
>qry=3D "select file from t_qa where no=3D"&messid 'file is a BLOB field
> oRs.Open qry, conAdoDB,adOpenStatic,adLockOptimistic
>
>If Not oRs.BOF And Not oRs.EOF Then
>
> Dim BlobSize
> BlobSize =3D oRs("file").ActualSize
> Response.Write BlobSize ''its printing as 72
> if BlobSize>0 then
> ByteF =3D oRs("file").GetChunk(BlobSize) 'error occuring
>here
> End If
>End If
>
>The error message is like
>
>
>Error Type:
>Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
>Multiple-step OLE DB operation generated errors. Check each OLE DB
>status value, if available. No work was done.
>/csdb/qna/filedownload.asp, line 375
>
>Does anyone of you know how to
>solve this
>best regards
>Sagar
>
>
Message #3 by buddie84@h... on Mon, 25 Jun 2001 10:41:33
|
|
Hi Kaus ,
thanx for the reply,
the problem iam facing when iam trying to retrive the BLOB field from
database.
The inserting is happening fine .
iam using "FILETOBLOB()" function for inserting the file in to database.
so it is not a problem with database field overflow
i could able to get the file properly using "LOTOFILE ()" funtion .
but i was not able to use GetChunk() method .
byteF=rec("field").GetChunk(size)
if this is possible i could use Response.BinaryWrite byteF
There is chances for overflow in "byteF"
can u pls suggest any method to overcome this situation .
regards
Sagar
> Hi
> i also faced this problem
> The reason i was getting error was field overflow.
>
> U r trying to insert more then the maximum of that field
> so u get 80040e21 error which is an ODBC Error.
>
> There might be some other reasons ...
> pls check if this works and let me know.
> by
> kaus
>
>
> U r using a
> >From: "Buddie" <buddie84@h...>
> >Reply-To: "ASP Databases" <asp_databases@p...>
> >To: "ASP Databases" <asp_databases@p...>
> >Subject: [asp_databases] Multiple-step OLE DB operation generated errors
> >Date: Mon, 25 Jun 2001 16:01:07 +0900
> >
> >Hi
> >iam facing a problem while trying to get the contents from a BLOB
> >field.
> >The BLOB field "file" containing image/text files.
> >It is getting fine through query analyzer.
> >The connection string is working for other operations
> >the error occuring in "GetChunk(size)"method.
> >iam using informix database
> >Version Informix Dynamic Server -2000 for Win NT
> >
> >
> >
> >
> >Set conAdoDB =3D Server.CreateObject("ADODB.Connection")
> >conAdoDB.Open("DSN=3Dcsdb;UID=3Dinformix;PWD=3Dinformix;")
> >Set oRs =3D Server.CreateObject("ADODB.Recordset")
> >qry=3D "select file from t_qa where no=3D"&messid 'file is a BLOB field
> > oRs.Open qry, conAdoDB,adOpenStatic,adLockOptimistic
> >
> >If Not oRs.BOF And Not oRs.EOF Then
> >
> > Dim BlobSize
> > BlobSize =3D oRs("file").ActualSize
> > Response.Write BlobSize ''its printing as 72
> > if BlobSize>0 then
> > ByteF =3D oRs("file").GetChunk(BlobSize) 'error occuring
> >here
> > End If
> >End If
> >
> >The error message is like
> >
> >
> >Error Type:
> >Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
> >Multiple-step OLE DB operation generated errors. Check each OLE DB
> >status value, if available. No work was done.
> >/csdb/qna/filedownload.asp, line 375
> >
> >Does anyone of you know how to
> >solve this
> >best regards
> >Sagar
> >
> >
|
|
 |