Querying the version of MDAC

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
 
G

Guest

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
 
M

Mark Rae

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...
 

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