T
toke
I've build a DLL in VB.net that handles all sorts of business logic.
This DLL accecesses a SQL server for some data in the following way:
<Begin pseudo-code snip>
Open a Connection
Con = new Connection (bla bla bla arguments)
'Make recordset 1 (using stored procedures, but only containing
"select" commands)
rs1 = new recordset
rs1.ActiveConnection = Con
bla bla bla
Open rs1
'Make recordset 2 using the same connection (using stored procedures,
but only containing "select" commands)
rs2 = new recordset
rs2.ActiveConnection = Con
bla bla bla
Open rs2
'Pass the rs into a delphi DLL that extracts information from the rs's
- only reading though
SomeResult = DelphiDLL.DoStuff(rs1,rs2,foo,bar)
'Clean up
Con.Close
Con = nothing
<End pesudo-code snip>
This works fine if I build a few win-forms and test the application
(even I a loop the app. and run it 2000 times, it works).
However, if I build some asp.net webforms, this code works some of the
time but not all!
It works almost everytime I start a completely new session (rebuild
the dll), but then it crashes if I run the page twice (that is, most
of the time - sometimes it works). Sometimes it even crashes the first
time around..... aaarggghhhhhh !!!
I've tried using two different connections (one for each rs), didn't
help - is this nessecary ? Or a bad idea ?
I've tried building a loop around the whole damn thing, looping 5-10
times if an Exception occured - works most of the time, but not all
(quite a few times it needs 1-3 attempts) before its running.
Any suggestions ??? Its driving me nuts ;/
tia,
t.
PS: The DLL originally was made for adodb 2.6 (correct number ? Or 2.7
??), but since it works flawlessly in VB.net it should be ok... at
least it seems like it from win-forms
This DLL accecesses a SQL server for some data in the following way:
<Begin pseudo-code snip>
Open a Connection
Con = new Connection (bla bla bla arguments)
'Make recordset 1 (using stored procedures, but only containing
"select" commands)
rs1 = new recordset
rs1.ActiveConnection = Con
bla bla bla
Open rs1
'Make recordset 2 using the same connection (using stored procedures,
but only containing "select" commands)
rs2 = new recordset
rs2.ActiveConnection = Con
bla bla bla
Open rs2
'Pass the rs into a delphi DLL that extracts information from the rs's
- only reading though
SomeResult = DelphiDLL.DoStuff(rs1,rs2,foo,bar)
'Clean up
Con.Close
Con = nothing
<End pesudo-code snip>
This works fine if I build a few win-forms and test the application
(even I a loop the app. and run it 2000 times, it works).
However, if I build some asp.net webforms, this code works some of the
time but not all!
It works almost everytime I start a completely new session (rebuild
the dll), but then it crashes if I run the page twice (that is, most
of the time - sometimes it works). Sometimes it even crashes the first
time around..... aaarggghhhhhh !!!
I've tried using two different connections (one for each rs), didn't
help - is this nessecary ? Or a bad idea ?
I've tried building a loop around the whole damn thing, looping 5-10
times if an Exception occured - works most of the time, but not all
(quite a few times it needs 1-3 attempts) before its running.
Any suggestions ??? Its driving me nuts ;/
tia,
t.
PS: The DLL originally was made for adodb 2.6 (correct number ? Or 2.7
??), but since it works flawlessly in VB.net it should be ok... at
least it seems like it from win-forms
