Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Ado Data RDS > COde hangs at R...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 249 of 305
Post > Topic >>

COde hangs at RecordSet.open()

by =?Utf-8?B?Vm9vZG9v?= <Voodoo@[EMAIL PROTECTED] > May 19, 2005 at 09:12 AM

Hi All,

I am facing a problem and i am running out of ideas. It would be a great
if 
any one of you can help me in resolving this. Please share your
experiences 
if you had come across such a problem or heard about it.
I am using MDAC 2.6 .

The problem:

I have two connection objects say conn1 ,conn2.
Now in my situation conn1 starts first executing conn1.execute and just 
after some 30 seconds RecordSetuses conn2 to fire a query on DB and fetch
the 
records.
Can you forsee any problem in this case. Conn1 executes a select clause
and 
creats a table table in say schema SCH1 and conn2 executes a select clause
to 
fetch records from a table which sits in say schema SCH2. 
Can you forsee anyproblem in this situation

The code is hanging at a call to RecordSet.open() and control return's
back 
after 30-40 minutes. I am reusing the connection object and this is not
ASP , 
it is VJ++. Please dont give up that you dont know VJ++ . I feel this
problem 
dosent need VJ++ knowledge , it need knowledge about ADO and MDAC calls. 
Coming back to problem , i have enabled SQL profiler and found that the
SQL 
is fired at DB only in the last minute of the hanging period.
I am using the following code to open a connection:

conn = new Connection();
conn.setCommandTimeout(m_commandTimeout);
conn.setCursorLocation(msado15.CursorLocationEnum.adUseClient);
conn.Open(sConnStr, "", "", ConnectOptionEnum.adConnectUnspecified);

Record Set code: 
IWTTabular is a wrapper around RecordSet().

IWTTabular tabRet = new WTTabular();		
tabRet.setCacheSize(100);
tabRet.Open(new Variant(sSQL), new Variant(conn),
		CursorTypeEnum.adOpenForwardOnly,				LockTypeEnum.adLockBatchOptimistic,						CommandTypeEnum.adCmdText);

I have tried changing adLockBatchOptimistic , but the code is hanging at 
..open and sometimes at setCacheSize(). The memory usage , CPU usage is
normal 
and number of connections are also normal. I strongly feel there is some 
serious problem with connection object or RecordSet.


Any thoughts on this problem please share them .
Any help will be highly appreciated.
 




 2 Posts in Topic:
COde hangs at RecordSet.open()
=?Utf-8?B?Vm9vZG9v?= <  2005-05-19 09:12:02 
Re: COde hangs at RecordSet.open()
"Brian Muth" &l  2005-05-19 10:10:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 14:12:54 CST 2008.