Internal .Net Framework Data Provider error 12.

A

Anant Kulkarni

Hi,
I am using .Net Framework 2.0. And for accessing data Oledb data
provider. This is used in a multi-threaded windows service. I am
getting the following error on a select query.

The stack trace is as follows.

Internal .Net Framework Data Provider error 12.
at
System.Data.ProviderBase.DbConnectionInternal.CreateReferenceCollection()
at
System.Data.ProviderBase.DbConnectionInternal.AddWeakReference(Object
value, Int32 tag)
at System.Data.OleDb.OleDbConnection.AddWeakReference(Object value,
Int32 tag)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteScalar()
at File_Transfer.clsDataAccessObject.GetCellValue(String strSql)
 
M

Miha Markic [MVP C#]

Hi Anant,

Does it happens on single thread, too (or in single thread of winforms)?
I am asking this because I already saw similar behaviour in one of less
known oledb providers..
 
C

Cowboy \(Gregory A. Beamer\)

All searches yield nothing on this error. What is the actual code that is
fired when the error comes up, pointing out the line of code the error
occurs on. That might help determine if there is something in the code that
causes the issue.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
A

Anant Kulkarni

Hi,
First of all thanks for replying. Actually, as i specified that i
am getting this error on a select query, which occurs at random time.
Some times this query is successfully fired and some times the error
occurs. I am using multi-threading in the application. Do you think,
this can be the cause of error ? I cannot paste the actual query here,
but it is a complex query with inner joins on multiple tables.
I dont have thread safety with my threads.
What may be the cause of error ?


Thanks.
 
A

Anant Kulkarni

Hi,
This problem did not occurred when my service was on a local
machine. But when i installed it on production server, the problem
started. I checked the OS and other service packs and version of
framework installed. Everything was the same.
In the local machine also i was using multiple threads. but the
problem occurred once in near about 100 tests. I never checked with
single thread. From the start i am using multiple threads.

Is it a problem with thread safety ? why cant i find a description
about the error i got on the internet ? not even Microsoft sites like
MSDN etc.....

I am in big trouble if this problem dosent solve in time. Please
help me as soon as possible.
 
M

Miha Markic [MVP C#]

Is it a problem with thread safety ?

who knows.

why cant i find a description
about the error i got on the internet ? not even Microsoft sites like
MSDN etc.....

Sure, because it is a provider specific error probably. You have to search
at provider's home site.
 
A

Anant Kulkarni

Hi,
I am using Oledb provider for SQL Server. Where should i search for
it then ? I tried the SQL server online books and all groups and
everything. Can you provide some clue for where should i search for
this error ?

Thanks !
 
M

Miha Markic [MVP C#]

Hi Anant,

Anant Kulkarni said:
Hi,
I am using Oledb provider for SQL Server. Where should i search for
it then ? I tried the SQL server online books and all groups and
everything. Can you provide some clue for where should i search for
this error ?

It was not clear that you were using Sql Server. Anyway, why don't you use
its managed provider instead? It might work better...
 
A

Anant Kulkarni

Hi,
Thanks for the advice, but a bad news is that i used the
SqlClient at the start. It gave me the infamous GNE (General Network
Error). When i switched to OleDb atleast that error is now disappeared.
But i still think that the source is not detected yet. Bcoz these kind
of other errors with no clue are slowly appearing now.
Can you give me some clue ? :(
 

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