Querying the version of MDAC

  • Thread starter Thread starter Mark Rae
  • Start date Start date
M

Mark Rae

Hi,

In ASP classic, I used to do something like this:

<%
Sub TestMDAC(pstrConnectionString)

Dim conn
Dim strVersion

Set conn = CreateObject("ADODB.Connection")

conn.ConnectionString = pstrConnectionString
conn.Open
strVersion = conn.Version
conn.Close

End Sub
%>

Is there a native .NET way to do the same? I'm hoping to run this on my
hosted web / database server, so:

1) I can't install and run Component Checker

2) I can't query the Registry

3) I can't query the version of any of the individual files outside my own
webspace

Any assistance gratefully received.

Mark Rae
 
Hi Mark,

Yes, absolutely. The property name has changed to ServerVersion thought:

Dim databaseConnection as SqlConnection = new SqlConnection()
Response.Write( databaseConnection.ServerVersion )

Cheers,
Steve Goodyear
Vancouver, Canada
 
Yes, absolutely. The property name has changed to ServerVersion thought:

No it hasn't.
Dim databaseConnection as SqlConnection = new SqlConnection()
Response.Write( databaseConnection.ServerVersion )

Which returns me the version of SQL Server (e.g. 08.00.0760), not the
version of MDAC...
 
Back
Top