<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19019"></HEAD>
<BODY>
<DIV><FONT size=2 face=Arial><SPAN
class=795352807-03082011>Hi,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=795352807-03082011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=795352807-03082011>We have just noticed
a strange behaviour recently, which I couldn't figure out how to resolve.
The issue could have been there all the time, just we didn't used the sequence
before.</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=795352807-03082011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=795352807-03082011>We have an
application, uses ADO to connect to SQL Server database. Components used
include TADOQuery, TADOStoreProcedure etc. It all works
fine.</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=795352807-03082011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=795352807-03082011>Then we have a form
which contains among other things, a TWebBrowser and a 'Print' button. On
click event of the Print button, we call:</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> WebBrowser_Help.ExecWB(OLECMDID_PRINT,
1);<BR></FONT></DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2 face=Arial>Which will bring up
printing dialog and print the contents of the TWebBrowser
component.</FONT></SPAN></DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2 face=Arial>The strange thing is
that after the Print button clicked, subsequent access to database via ADO
components all failed with Exception. The following is a sample exception
message:</FONT></SPAN></DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2 face="Book Antiqua">Arguments
are of the wrong type, are out of acceptable range, or are in conflict with one
another</FONT></SPAN></DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2 face=Arial>I have tried to
close ADOConnection, reopen etc, the database access still doesn't
success.</FONT></SPAN></DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2 face=Arial>Anyone knows how to
fix this issue?</FONT></SPAN></DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=795352807-03082011><FONT size=2
face=Arial>Edward</FONT></SPAN></DIV></BODY></HTML>