HELP---Class not Registered Error

Discussion in 'ASP.NET / ASP.NET Core' started by valaneke, Aug 16, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. hi,
    i tried doing my maintaince on my site and i recieved an error Class not Registered Error, my first page needs to connect and read the access database. it highlights conn.open on the error page. do help.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    what is the code you are using? Can you post it?

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    are you running this code on DASP's server or your local computer? the code looks fine to me, it looks like a server config issue.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Runtime.InteropServices.COMException: Class not registered

    Source Error:





    Code:
    Line 80:         Dim cmdpu As OleDbCommand = New OleDbCommand("SELECT count(*) FROM  jobs WHERE category = 'Public affairs and Government Administration' ", conn)
    Line 81:         Dim cmdre As OleDbCommand = New OleDbCommand("SELECT count(*) FROM  jobs WHERE category = 'Retail' ", conn)
    Line 82:         conn.Open()
    Line 83: 
    Line 84: 
    Source File: C:\Inetpub\wwwroot\minervarecruitment\index.aspx.vb Line: 82

    --------------------------------------------------------------------------------
    CODE:




    Imports System.Data


    Imports System.Data.OleDb


    Public Class WebForm1


    Inherits System.Web.UI.Page


    #Region " Web Form Designer Generated Code "


    'This call is required by the Web Form Designer.


    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()


    End Sub


    Protected WithEvents accountTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents bankTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents engineerTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents entTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents itTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents langTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents retailTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents govTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents legalTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents marketTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents medicTxt As System.Web.UI.WebControls.TextBox


    Protected WithEvents HyperLink1 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink2 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink3 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink4 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink5 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink6 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink7 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink8 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink9 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink10 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink11 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink12 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink13 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink14 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink15 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink16 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents HyperLink17 As System.Web.UI.WebControls.HyperLink


    Protected WithEvents AdRotator1 As System.Web.UI.WebControls.AdRotator


    Protected WithEvents AdRotator2 As System.Web.UI.WebControls.AdRotator


    Protected WithEvents AdRotator3 As System.Web.UI.WebControls.AdRotator


    Protected WithEvents AdRotator4 As System.Web.UI.WebControls.AdRotator


    'NOTE: The following placeholder declaration is required by the Web Form Designer.


    'Do not delete or move it.


    Private designerPlaceholderDeclaration As System.Object


    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init


    'CODEGEN: This method call is required by the Web Form Designer


    'Do not modify it using the code editor.


    InitializeComponent()


    End Sub


    #End Region


    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


    'Put user code to initialize the page here





    Dim strCon As String


    Dim conn As OleDbConnection


    Dim conAdp As OleDbDataAdapter


    Dim sql As String


    Dim n As String


    strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp; _


    Server.MapPath("recruitment.mdb") &amp; ";"


    conn = New OleDbConnection(strCon)


    Dim cmdpu As OleDbCommand = New OleDbCommand("SELECT count(*) FROM jobs WHERE category = 'Public affairs and Government Administration' ", conn)


    Dim cmdre As OleDbCommand = New OleDbCommand("SELECT count(*) FROM jobs WHERE category = 'Retail' ", conn)


    conn.Open()


    entTxt.Text = "( " &amp; cmde.ExecuteScalar() &amp; " )"


    legalTxt.Text = "( " &amp; cmdleg.ExecuteScalar() &amp; " )"


    conn.Close()


    End Sub
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page