ADODB Errors in ASP.Net

G

Guest

We are intermittantly geting the following errors on our web site and they
are always on and ADODB command of some sort. Any ideas?


Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.AccessViolationException: Attempted to read or
write protected memory. This is often an indication that other memory is
corrupt.

Source Error:


Line 8: Protected WithEvents DropDownList1 As
System.Web.UI.WebControls.DropDownList
Line 9: Protected WithEvents Button1 As System.Web.UI.WebControls.Button
ERROR Here ->>>Line 10: Dim mRec As New ADODB.Recordset
Line 11: Dim inString As
System.Collections.Specialized.NameValueCollection
Line 12: Dim theData As DataSet = New DataSet
 
K

Kevin Spencer

Don't use ADODB, which is COM. Use the .Net data classes.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

It takes a tough man to make a tender chicken salad.
 
G

Guest

I had a feeling that was going to be the answer. Can you give me some
explanation as to why?
 
M

Miro

I use the .Com version

What is the .Net Equivalent. If i remember correctly I couldnt find one so
i just used the .com

I create db's and tables but I havnt run into any problems yet ( and dont
want to ) so i would want to switch it
away from .Com if .Net always works.

M.
 
K

Kevin Spencer

COM (Component Object Model) is a technology prior to .Net, and is
incompatible with .Net natively. To use COM, you have to use Interop, which
impedes performance, and can cause issues related to the different memory
models. The .Net platform comes with its own data access classes which are
not hard to use.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

It takes a tough man to make a tender chicken salad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top