"MDAC required" but it's installed...

D

DraguVaso

Hi,

I'm having this error in a VB.NET-application at the moment that I attempt
to read data from an SQL Server:


The .Net Data SQL Provider (System.Data.SqlClient) requires Microsoft Data
Access Components(MDAC) version 2.6 or later. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
Failed to Load Call Data Call Data Failure


However the MDAC 2.7 is installed! And when I look into the registry it is
indicated as installed too:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\FullInstallVer =
"2.71.9040.2"

The .NET Framework is installed (1.1), and it is on a Windows NT (Sp 6a) pc.

Does anybody know about thisp roblem? And some solution? Could it be because
of some restictions (although I do have full Admin rights on the pc).

I'ts really urgent and bothering me (I have to do a demo in 20 minutes,
hehe).

Thanks a lot in advance, any help, hints etc will be really appreciated!

Pieter
 
A

Arne Janning

DraguVaso said:
I'm having this error in a VB.NET-application at the moment that I attempt
to read data from an SQL Server:
The .Net Data SQL Provider (System.Data.SqlClient) requires Microsoft Data
Access Components(MDAC) version 2.6 or later. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
Failed to Load Call Data Call Data Failure


However the MDAC 2.7 is installed! And when I look into the registry it is
indicated as installed too:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\FullInstallVer =
"2.71.9040.2"

The .NET Framework is installed (1.1), and it is on a Windows NT (Sp 6a) pc.

Does anybody know about thisp roblem? And some solution? Could it be because
of some restictions (although I do have full Admin rights on the pc).

I'ts really urgent and bothering me (I have to do a demo in 20 minutes,
hehe).

Thanks a lot in advance, any help, hints etc will be really appreciated!

Hi DraguVaso,

seems you're not alone:

http://groups.google.de/[email protected]

http://groups.google.de/groups?selm=1575b01c1b9a7$f5afca20$3def2ecf@TKMSFTNGXA14

The MDAC Utility: Component Checker might help

http://www.microsoft.com/downloads/...f6-4a21-4b43-bf53-14332ef092c9&displaylang=en

Cheers

Arne Janning
 
D

DraguVaso

I reinstalled it but it doesn't work...

Miha Markic said:
Hi,

Does it help if you reinstall mdac?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

DraguVaso said:
Hi,

I'm having this error in a VB.NET-application at the moment that I attempt
to read data from an SQL Server:


The .Net Data SQL Provider (System.Data.SqlClient) requires Microsoft Data
Access Components(MDAC) version 2.6 or later. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
Failed to Load Call Data Call Data Failure


However the MDAC 2.7 is installed! And when I look into the registry it is
indicated as installed too:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\FullInstallVer =
"2.71.9040.2"

The .NET Framework is installed (1.1), and it is on a Windows NT (Sp 6a) pc.

Does anybody know about thisp roblem? And some solution? Could it be because
of some restictions (although I do have full Admin rights on the pc).

I'ts really urgent and bothering me (I have to do a demo in 20 minutes,
hehe).

Thanks a lot in advance, any help, hints etc will be really appreciated!

Pieter
 
C

Cor Ligthert

Hi Pieter,

And the message from Ken, I was not looking for you because I thought that
was it?

Cor
 
D

DraguVaso

It doesn't have much to do with that:
- VS.NET is not installed, so reisntalling won't do much :)
- I use the framwork 1.1 an VS.NET 2003, not 1.0 and 2002 (for which the
article is made)
 
D

DraguVaso

See thread: it doesn't have much to do with that. I'm gonna try to look with
the Component Checker, and do some trial and error :)

Maybe MDAC 2.8 will help. And would Jet have something to do with it?
 
D

DraguVaso

Ok: some 'funny' results:

I installed JET 4.0 SP7: It worked once (ONCE!!), and afterwarths I got the
same error... :-(

Than I installed JET 4.0 SP8 and MDAC 2.8: It still doesn't work, but the
Error-message is different now:
Object reference not set to an instance of an object. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()


I'm still not able to find out what causes the problem and how to find a
resolution :-( Any help would really be appreciated!! The weird thing is
that it only happens on one pc (NT SP6a), on the others I tested it (a 2000
and a NT SP6A) it works fine...

Thanks in advance,

Pieter
 
D

DraguVaso

I checked this alreaddy in the beginning, but everything looks fine
(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\FullInstallVer =
"2.71.9040.2")
 
D

DraguVaso

Ok it's absolutely not my lucky day :-(
On the other NT I get the same error now...

Couldn't it be because of an error on the SQL Server? Some security-stuff? I
checked with the administrator and he didn't change anything...
 
D

DraguVaso

Ok, I modified my source-code a little bit so I can se where it goes wrong:

This is my function:

Private Sub ShowClientInfo(ByVal strIndice As String)
If strIndice.Length <= 0 Then
txtInfo.Text = "No Identification"
Exit Sub
End If

Dim strSql As String
strSql = "SELECT TOP 1 (tdprNFoy + tdprNCCD) AS DossierNr,
(tcliLSigl1 + ' ' + tcliLNomPren1) AS Cl1, " & _
"(tcliLSigl2 + ' ' + tcliLNomPren2) AS Cl2, tdcaNCartphy, Auto,
Choice " & _
"FROM tblCalls LEFT JOIN tblDossiers ON tblCalls.DossierID =
tblDossiers.DossierID " & _
"WHERE (Indice = '" & strIndice & "') " & _
"ORDER BY CallID DESC"

MessageBox.Show("a1")
Dim dtrSql As SqlDataReader
Dim conSql As SqlConnection
conSql = New SqlConnection(strConn)
Dim cmdSql As SqlCommand
MessageBox.Show("a2" & conSql.ConnectionString)
Try
MessageBox.Show("a3")
conSql.Open()
MessageBox.Show("a4")
cmdSql = New SqlCommand(strSql, conSql)
MessageBox.Show("b")
dtrSql = cmdSql.ExecuteReader(CommandBehavior.SingleRow)
MessageBox.Show("c")
dtrSql.Read()
MessageBox.Show("d")
If dtrSql.HasRows Then
MessageBox.Show("e")
strDossierNr = dtrSql.Item("DossierNr").ToString
MessageBox.Show("f")
txtInfo.Text = "DOSSIER: " & strDossierNr & cstDelimit & _
"CARD: " & dtrSql.Item("tdcaNCartphy").ToString & cstDelimit
& _
dtrSql.Item("Choice").ToString & cstDelimit & vbCrLf & _
dtrSql.Item("Cl1").ToString & ", " &
dtrSql.Item("Cl2").ToString
MessageBox.Show("g")
If chkAuto.Checked Then
'Auto-handeling doen
Select Case dtrSql.Item("Auto").ToString
Case "SAVE"
Dim clsVBS As New clsVBScripts
clsVBS.SAVE(strDossierNr)
clsVBS = Nothing

Case "CONT"
Dim clsVBS As New clsVBScripts
clsVBS.CONT(strDossierNr)
clsVBS = Nothing

End Select
End If
Else
MessageBox.Show("Failed to Load Call Data", "Call Data
Failure", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
End If

Catch ex As Exception
ErrorMessage(Me, ex, "Failed to Load Call Data", "Call Data
Failure")
Finally
MessageBox.Show("k")
dtrSql.Close()
MessageBox.Show("k1")
cmdSql.Dispose()
MessageBox.Show("k2")
If conSql.State = ConnectionState.Open Then
MessageBox.Show("l")
conSql.Close()
End If
MessageBox.Show("m")
dtrSql = Nothing
cmdSql = Nothing
conSql = Nothing
MessageBox.Show("n")
End Try

End Sub


I get this messageboxes: a1, a2, a3, than the error, k
So the error seems to happen on the "conSql.Open()"-statement.
Really weird is also that it only shows the "k" of the finally, and not the
k1, k2, l, m and n... :-(

And much weirder: I managed to get it working one time again, but the next
time it didn't work anymore :-( So it works kind of randomly: 2 times it
worked, +- 15 times it didn't work... :-( Couldn't it be because something
on the SQL Server?

please help :-(

Pieter
 
D

DraguVaso

No I dodn't use Windows Update on these pc's. In fact there are all NT, and
there isn't any Windows Update on NT (or am I wrong?).
As a matter of fact: I use Windows Update on my pc, and here it works? Maybe
I should use Windows Update? hehe :)
 
D

DraguVaso

I tryed that, but it didn't work: the error becomes now:
Object reference not set to an instance of an object. at
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
 
S

scorpion53061

This error normally occurs when a connection cannot be established with the
server.

Create a new project (do not use anything from this current project you are
in) and attempt to create a connection there. Don't get fancy.

If this does not work, copy and paste here the code you are using.

If this does not work then

1. reinstall Jet
2. reinstall the Framework
3. Reinstall MDAC 2.8

If this does not work reinstall Windows. Others may disagree with me but
trying all this if it fails it is clear the corrpution is in your operating
environment.
 

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