BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange exception problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker
View previous topic :: View next topic  
Author Message
Del Murray
Guest





PostPosted: Mon Aug 02, 2004 2:35 pm    Post subject: Strange exception problem Reply with quote



Enviornment ,, D5 Client server, W2K Server, SQL Server 2K, ActivePDF

I have a program that has been in production for at lease 6 months, no
problems. All of a sudden I get this ...

Access violation at address 0284BAE8 in module 'rmwebdocmgr.dll'. Read of
address 00000004

The program does the following ...

1. selects an "html" document from a table (stored in a blob field).
2. Calls the activePDF server to convert the html document to pdf.
3. The activePDF server is correctly converting the document because it
writes it on the server and I can see it and open it.
4. The program then reads the PDF into a tStringStream.
5. I then take the data from the tStringStream and put it back in the table
where the original data came from ... so now instead of html in the blob , I
have a pdf in the blob.

All this has worked fine for sometime now.

The program works fine on the development workstations, it works fine on the
QA server, It works fine on the backup servers, it works fine everywhere
..... it just REFUSES to work on the production server (where it has been
running for some time now) Following is the failing code.

with qryDoc do begin
wkstr := ts.datastring;
// cnRMS.BeginTrans;
edit;
fieldbyname('docimg').value := wkstr;
fieldbyname('docext').asstring := '.pdf';
// updatebatch;
try
post;
// cnRMS.CommitTrans;
inc(cvtcnt);
except
on e:exception do begin
gError.add(e.message);
response.content := ppGeneralError.content;
// cnRMS.RollbackTrans;
exit;
end;
end;
end;

This is what I am doing. The qryDoc is a tADODataset that contains the whole
row from the table. As you can tell by the comments, I have tried different
techniques to post the data. It throws the exception on the POST statement.
If I run the program on a development box pointing at the production
database, it runs ok. This tells me that the database is not corrupt or
anything. One part of the code allow a user to "upload" a file, so I took
the generated PDF and uploaded it to the database to see if something about
the PDF was making the program choke. It uploaded fine .. go figure. I can
create an HTML doc and save it in the database just fine using approximately
the same technique as above, but this damn thing refuses to run on the prod
server. I think that it is problem with a registry entry maybe because a
google for the error message didn't get me hit but it showed lots of
responses which pointed overwhelmingly to cleaning up a registry entry.
Problem is , I dont make registry entries so it is someother software entry
(mabye ADO ?) that is junky .. maybe...


It worked one time after I make one of the changes to the code above, and
then never worked again ....
Could it be a bad memory chip ??? surely not, everthing else runs like
clock-work.

Anybody got a clue ?


Back to top
danny heijl
Guest





PostPosted: Mon Aug 02, 2004 4:48 pm    Post subject: Re: Strange exception problem Reply with quote



I think that using a TAdoCommand (preferably with with parameters) to do
database updates will not only be faster but will also cause less
trouble, especially with blobs.

Data type mismatches can also cause problems with blobs.

Danny
---

Back to top
Del Murray
Guest





PostPosted: Mon Aug 02, 2004 5:31 pm    Post subject: Re: Strange exception problem Reply with quote



Perhaps it would be faster but you probaly cant measure it with your eyeball
in a web based application, and after all , it is only one row that I am
updating. The same code works on 6 different machines in the cluster, but
not on 1 particular machine,( where it used to work also). I think I did a
window security update the other day and right after that it stopped
working.


Back to top
danny heijl
Guest





PostPosted: Mon Aug 02, 2004 6:12 pm    Post subject: Re: Strange exception problem Reply with quote

Del Murray schreef:

Quote:
Perhaps it would be faster but you probaly cant measure it with your eyeball
in a web based application, and after all , it is only one row that I am
updating.

You may be right but MS documentation discourages updates through a
recordset.

The same code works on 6 different machines in the cluster, but
Quote:
not on 1 particular machine,( where it used to work also). I think I did a
window security update the other day and right after that it stopped
working.

Can it be a variant problem, where the actual contents of the PDF causes
problems in the conversion from string to variant?

Could using a blobstream for binary content like PDF solve the problem ?

Danny
---

Back to top
danny heijl
Guest





PostPosted: Mon Aug 02, 2004 6:56 pm    Post subject: Re: Strange exception problem Reply with quote

Del Murray schreef:

Quote:
One works, the other fails but only on one machine.

We've had similar problems in the past due to different Mdac versions. I
only mentioned it because using blobstreams and insert/update statements
has helped us in the past.

Danny
---

Back to top
Del Murray
Guest





PostPosted: Mon Aug 02, 2004 6:56 pm    Post subject: Re: Strange exception problem Reply with quote

I suppose I could try that but .... if i take the output of the pdf and go
to the place in my application that allows a user to upload anyfile to the
document database, the pdf file uploads into the database fine. I use the
same technique to update as I do to add a new file so I dont think
conversion is a problem .. both pieces of code say

qryDoc. fieldbyname('docimg').value := ts.datastring;

One works, the other fails but only on one machine.


Back to top
Del Murray
Guest





PostPosted: Mon Aug 02, 2004 8:04 pm    Post subject: Re: Strange exception problem Reply with quote

I thought blobstream only worked with bde stuff ?


Back to top
Nick Hodges [TeamB]
Guest





PostPosted: Mon Aug 02, 2004 9:27 pm    Post subject: Re: Strange exception problem Reply with quote

Del Murray wrote:

Quote:
I thought blobstream only worked with bde stuff ?

No, there are blobstream classes for every TDataset descendant on the
palette.

--
Nick Hodges -- TeamB
Lemanix Corporation -- http://www.lemanix.com
Read my Blog -- http://www.lemanix.com/nick

Back to top
danny heijl
Guest





PostPosted: Mon Aug 02, 2004 9:29 pm    Post subject: Re: Strange exception problem Reply with quote

Del Murray schreef:

Quote:
I thought blobstream only worked with bde stuff ?

I meant a TStream instantiated with TAdoDataSet.CreateBlobStream for a
blobfield, sorry if I caused confusion.

Danny
---

Back to top
Del Murray
Guest





PostPosted: Mon Aug 02, 2004 11:45 pm    Post subject: Re: Strange exception problem Reply with quote

Nick,
Have you been following this. My column data type is "image" because i will
let a user put pdf, tif, gif, doc, etc into the column. It's been working
fine. I just tried a tADOCommand updating with a sql "update" statement and
passing the data as parameters and it worked on test and QA, then failed (as
usual) in production. I'm going to chand the adocommand text to do
"updatetext" instead of "update" and see if that passes. This has been
working for months and suddenly fails. I use the same ado component to add a
new pdf that was created by my cnversion code and it uploads fine but if i
grab the file with a stream and poke it into the image column, it fails and
it used to work .. i'm really confused. Got any more hints ?

Del


Back to top
Nick Hodges [TeamB]
Guest





PostPosted: Tue Aug 03, 2004 2:08 am    Post subject: Re: Strange exception problem Reply with quote

Del Murray wrote:

Quote:
Got any more hints ?

Sorry, on that one I don't. I don't know enough about how ADO works to
be able to help.

--
Nick Hodges -- TeamB
Lemanix Corporation -- http://www.lemanix.com
Read my Blog -- http://www.lemanix.com/nick

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Isapi-WebBroker All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.