ASPX ADOConnection

mirzahome

New Member
Hmmmm. Just Installed BETA2 and MDAC 2.7. I am trying an example from the 4guys site and get the following compilation error:<BR><BR>BC30002: Type is not defined: 'ADOConnection'<BR><BR>The code (to that point) is:<BR><BR><%@ language="vb" %><BR><%@ import namespace="system.data" %><BR><%@ import namespace="system.data.ado" %><BR><BR><script language="vb" runat="server"><BR><BR> Sub Page_Load(Source as Object, E as EventArgs)<BR> Dim strConnString as String<BR> strConnString = "Provider=SQLOLEDB; Data Source=(local); " & _<BR> "Initial Catalog=pubs; User ID=sa"<BR><BR> Dim objConn as ADOConnection<BR> objConn = New ADOConnection(strConnString)<BR> objConn.Open()<BR><BR>Go to www.asp101.com<BR>They just updated all their code to work with BETA 2. Almost all the code on tutorial sites is still from BETA 1 and won;t work with BEAT 2.you don't use "system.data.ado" anymore - use "system.data.oledb"<BR><BR>and the object is an oledbconnection now instead of adoconnection<BR><BR>hth
 
Back
Top