|
 |
ado_dotnet thread: mdac verification
Message #1 by berniey@c... on Mon, 4 Feb 2002 22:37:43
|
|
I?m concerned about the version of MDAC on my system.
I just received a new Windows XP Professional PC. One of my goals was to
install the .net framework (Beta 2) and the highest version of MDAC I
could get my hands on. I didn?t know at the time (I just read somewhere)
that XP Professional installs with MDAC 2.7.
In any event, I installed a ton of programs, including MS SQL 7 (personal
edition); it appeared to be installing ADO components automatically, as I
saw something like that flash across the screen.
After installing Beta 2, I went to the Microsoft website and downloaded
the 2.7 install routine, even though there was no reference to it begin
for XP. I installed it and it appeared to install fine. I then
downloaded and ran the MDAC checker they provide ? I ran it and it
said ?several versions are on this system, but the closest is 2.1etc? or
words to that effect. (The exact message was ?More than one version of
mdac matches your computer?s configuration?.)
I ran the code at the bottom (which is essentially a Wrox code snippet)
and it worked fine (I installed IIS with no difficulty).
Here?s my question: how can I be sure I have MDAC 2.7? Is the MDAC
checker buggy? (I also tried to run it against a specific version but it
returned some erroneous message.) I just realized, though, that the MS
documentation does not mention XP as one of the systems it works on.
Should I restore a version of XP, and if I do so, what are the
consequences for other programs on my system? I?m not worried about MS
SQL 7, as I can remove that ? perhaps I?ll install a version of SQL 2000,
or will that be a problem? Finally, is there a simple routine I can run
to determine if 2.7 is installed?
Thanks for any help you can offer.
Regards,
Bernie Yaeger
ASP .net code
<% @import Namespace="System.Data" %>
<% @import Namespace="System.Data.Oledb" %>
<script language="vb" runat="server">
sub page_load()
dim strconnection as string = "provider=microsoft.jet.oledb.4.0;"
strconnection += "Data Source=c:\begaspnet\ch12\northwind.mdb"
data_src.text = strconnection
dim strsql as string = "select firstname, lastname from employees"
dim strresultsholder as string
dim objconnection as new oledbconnection(strconnection)
dim objcommand as new oledbcommand(strsql, objconnection)
dim objdatareader as oledbdatareader
try
objconnection.open()
con_open.text="Connection opened successfully.<br />"
objdatareader = objcommand.executereader()
do while objdatareader.read()=true
strresultsholder += objdatareader("firstname")
strresultsholder += " "
strresultsholder += objdatareader("lastname")
strresultsholder += "<br>"
loop
objdatareader.close()
objconnection.close()
con_close.text="Connection closed.<br>"
divlistemployees.innerhtml = strresultsholder
catch e as exception
con_open.text="Connection failed to open successfully.<br>"
con_close.text=e.tostring()
end try
end sub
</script>
<html>
<body>
<h4>Reading data from the connection
<asp:label id="data_src" runat="server"/> with the Datareader object.</h4>
<asp:label id="con_open" runat="server"/><br>
<div id="divlistemployees" runat="server">list will go here</div>
<asp:label id="con_close" runat="server"/><br>
</body>
</html>
Message #2 by pgtips@m... on Tue, 5 Feb 2002 15:14:46
|
|
Its possible that the MDAC checker doesn't recognise MDAC 2.7. The
MSKB article Q301202 says that the checker applies to MDAC versions
2.1 through 2.6 - no mention of 2.7.
You probably acquired 2.1 with your sql server install.
There is also a registry entry you can check (does XP have a registry?
i dunno, i'm still stuck on nt4 :-( ):
HKEY_LOCAL_MACHINE\Software\Microsoft\DataAccess\FullInstallVer
Bottom line - your code works :-)
HTH
Phil
> I'm concerned about the version of MDAC on my system.
>
> I just received a new Windows XP Professional PC. One of my
> goals was to
> install the .net framework (Beta 2) and the highest version of MDAC
I
> could get my hands on. I didn't know at the time (I just
> read somewhere)
> that XP Professional installs with MDAC 2.7.
>
> In any event, I installed a ton of programs, including MS SQL
> 7 (personal
> edition); it appeared to be installing ADO components
> automatically, as I
> saw something like that flash across the screen.
>
> After installing Beta 2, I went to the Microsoft website and
> downloaded
> the 2.7 install routine, even though there was no reference
> to it begin
> for XP. I installed it and it appeared to install fine. I then
> downloaded and ran the MDAC checker they provide - I ran it and it
> said 'several versions are on this system, but the closest is
> 2.1etc' or
> words to that effect. (The exact message was 'More than one
> version of
> mdac matches your computer's configuration'.)
>
> I ran the code at the bottom (which is essentially a Wrox
> code snippet)
> and it worked fine (I installed IIS with no difficulty).
>
> Here's my question: how can I be sure I have MDAC 2.7? Is the MDAC
> checker buggy? (I also tried to run it against a specific
> version but it
> returned some erroneous message.) I just realized, though,
> that the MS
> documentation does not mention XP as one of the systems it works on.
> Should I restore a version of XP, and if I do so, what are the
> consequences for other programs on my system? I'm not
> worried about MS
> SQL 7, as I can remove that - perhaps I'll install a version
> of SQL 2000,
> or will that be a problem? Finally, is there a simple
> routine I can run
> to determine if 2.7 is installed?
>
> Thanks for any help you can offer.
>
> Regards,
>
> Bernie Yaeger
> ASP .net code
>
> <% @import Namespace="System.Data" %>
> <% @import Namespace="System.Data.Oledb" %>
>
> <script language="vb" runat="server">
> sub page_load()
> dim strconnection as string = "provider=microsoft.jet.oledb.4.0;"
> strconnection += "Data Source=c:\begaspnet\ch12\northwind.mdb"
> data_src.text = strconnection
> dim strsql as string = "select firstname, lastname from employees"
> dim strresultsholder as string
> dim objconnection as new oledbconnection(strconnection)
> dim objcommand as new oledbcommand(strsql, objconnection)
> dim objdatareader as oledbdatareader
>
> try
> objconnection.open()
> con_open.text="Connection opened successfully.<br />"
> objdatareader = objcommand.executereader()
> do while objdatareader.read()=true
> strresultsholder += objdatareader("firstname")
> strresultsholder += " "
> strresultsholder += objdatareader("lastname")
> strresultsholder += "<br>"
>
> loop
> objdatareader.close()
> objconnection.close()
> con_close.text="Connection closed.<br>"
> divlistemployees.innerhtml = strresultsholder
> catch e as exception
> con_open.text="Connection failed to open successfully.<br>"
> con_close.text=e.tostring()
> end try
> end sub
> </script>
>
> <html>
> <body>
> <h4>Reading data from the connection
> <asp:label id="data_src" runat="server"/> with the Datareader
> object.</h4>
> <asp:label id="con_open" runat="server"/><br>
> <div id="divlistemployees" runat="server">list will go here</div>
> <asp:label id="con_close" runat="server"/><br>
> </body>
> </html>
Message #3 by "Bernie Yaeger" <berniey@c...> on Tue, 5 Feb 2002 13:04:45 -0500
|
|
Hi Phil,
It's the correct mdac version - thanks!
Bernie
----- Original Message -----
From: <pgtips@m...>
To: "ADO.NET" <ado_dotnet@p...>
Sent: Tuesday, February 05, 2002 3:14 PM
Subject: [ado_dotnet] Re: mdac verification
> Its possible that the MDAC checker doesn't recognise MDAC 2.7. The
> MSKB article Q301202 says that the checker applies to MDAC versions
> 2.1 through 2.6 - no mention of 2.7.
>
> You probably acquired 2.1 with your sql server install.
>
> There is also a registry entry you can check (does XP have a registry?
> i dunno, i'm still stuck on nt4 :-( ):
> HKEY_LOCAL_MACHINE\Software\Microsoft\DataAccess\FullInstallVer
>
> Bottom line - your code works :-)
>
> HTH
> Phil
> > I'm concerned about the version of MDAC on my system.
> >
> > I just received a new Windows XP Professional PC. One of my
> > goals was to
> > install the .net framework (Beta 2) and the highest version of MDAC
> I
> > could get my hands on. I didn't know at the time (I just
> > read somewhere)
> > that XP Professional installs with MDAC 2.7.
> >
> > In any event, I installed a ton of programs, including MS SQL
> > 7 (personal
> > edition); it appeared to be installing ADO components
> > automatically, as I
> > saw something like that flash across the screen.
> >
> > After installing Beta 2, I went to the Microsoft website and
> > downloaded
> > the 2.7 install routine, even though there was no reference
> > to it begin
> > for XP. I installed it and it appeared to install fine. I then
> > downloaded and ran the MDAC checker they provide - I ran it and it
> > said 'several versions are on this system, but the closest is
> > 2.1etc' or
> > words to that effect. (The exact message was 'More than one
> > version of
> > mdac matches your computer's configuration'.)
> >
> > I ran the code at the bottom (which is essentially a Wrox
> > code snippet)
> > and it worked fine (I installed IIS with no difficulty).
> >
> > Here's my question: how can I be sure I have MDAC 2.7? Is the MDAC
> > checker buggy? (I also tried to run it against a specific
> > version but it
> > returned some erroneous message.) I just realized, though,
> > that the MS
> > documentation does not mention XP as one of the systems it works on.
>
> > Should I restore a version of XP, and if I do so, what are the
> > consequences for other programs on my system? I'm not
> > worried about MS
> > SQL 7, as I can remove that - perhaps I'll install a version
> > of SQL 2000,
> > or will that be a problem? Finally, is there a simple
> > routine I can run
> > to determine if 2.7 is installed?
> >
> > Thanks for any help you can offer.
> >
> > Regards,
> >
> > Bernie Yaeger
> > ASP .net code
> >
> > <% @import Namespace="System.Data" %>
> > <% @import Namespace="System.Data.Oledb" %>
> >
> > <script language="vb" runat="server">
> > sub page_load()
> > dim strconnection as string = "provider=microsoft.jet.oledb.4.0;"
> > strconnection += "Data Source=c:\begaspnet\ch12\northwind.mdb"
> > data_src.text = strconnection
> > dim strsql as string = "select firstname, lastname from employees"
> > dim strresultsholder as string
> > dim objconnection as new oledbconnection(strconnection)
> > dim objcommand as new oledbcommand(strsql, objconnection)
> > dim objdatareader as oledbdatareader
> >
> > try
> > objconnection.open()
> > con_open.text="Connection opened successfully.<br />"
> > objdatareader = objcommand.executereader()
> > do while objdatareader.read()=true
> > strresultsholder += objdatareader("firstname")
> > strresultsholder += " "
> > strresultsholder += objdatareader("lastname")
> > strresultsholder += "<br>"
> >
> > loop
> > objdatareader.close()
> > objconnection.close()
> > con_close.text="Connection closed.<br>"
> > divlistemployees.innerhtml = strresultsholder
> > catch e as exception
> > con_open.text="Connection failed to open successfully.<br>"
> > con_close.text=e.tostring()
> > end try
> > end sub
> > </script>
> >
> > <html>
> > <body>
> > <h4>Reading data from the connection
> > <asp:label id="data_src" runat="server"/> with the Datareader
> > object.</h4>
> > <asp:label id="con_open" runat="server"/><br>
> > <div id="divlistemployees" runat="server">list will go here</div>
> > <asp:label id="con_close" runat="server"/><br>
> > </body>
> > </html>
>
$subst('Email.Unsub').
>
|
|
 |