473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

ADO connection err. in ASP but not in VB.net

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 :)
Nov 18 '05 #1
1 1195
If it's the same code running as a desktop application and an ASP.NET
application and an ADO.NET connection error, then chances are you need to
provide (greater) privileges to the aspnet work process account.
--
Peter O'Reilly
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: G-Fit | last post by:
Hello group, I have several servers hosting SQL databases. On each of them, I have several databases. All those databases have the same structure (even those on different servers), only the data...
11
by: pradeep_TP | last post by:
Hi all, I have a few questions that I have been wanting to ask for long. These are all related to ADO.net and specifically to conenction to database. 1) If I have opened a connection to a...
0
by: iKiLL | last post by:
Hi All Code Below for this problem ERROR: "An existing connection was forcibly closed by the remote host"
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.