Link to home
Start Free TrialLog in
Avatar of homeshopper
homeshopperFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Cannot create ActiveX component

I am getting following error:
EL4 :err:374:BuildSQLCmd:Uncomment-full Error:System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class)
at Company.get_CompanyID() in c:\Projects\sqlCamSmoAdoCSplusDev\sqlCamSmoAdoCSplusData\Secure\Company.aspx.cs:line 401
at Company.BuildSQLCmd(String StoredProcName, SqlConnection Conn, SqlTransaction tr, Boolean AutoParams)
in c:\Projects\sqlCamSmoAdoCSplusDev\sqlCamSmoAdoCSplusData\Secure\Company.aspx.cs:line 346

return (string)Microsoft.VisualBasic.Interaction.GetObject("CompanyID", null);// line 401 error
if (cmd.Parameters.Contains("@CompanyID") & CompanyID != null)// line 346 error

Thanks in advance for any help given.
Complete code as per attached file.
Below is complete display on screen:
EL1 :err:103:PL:AppConnection:Server=.\SQLEXPRESS;Database=Cams2;Uid=sa;#
EL1 :err:108:PL:AppConnection:Server=.\SQLEXPRESS;Database=Cams2;Uid=sa;#StartCo:StartURL:UserID:4#
EL1 :err:270:GDT:AppConnection:Server=.\SQLEXPRESS;Database=Cams2;Uid=sa;# SQLProc:usp_GetUserAccess ParmName:@UserID ParmValue:4#
EL1 :err:302:BuildSQLCmd:AppConnection:Server=.\SQLEXPRESS;Database=Cams2;Uid=sa;#StoredProcName:usp_GetUserAccess
EL1 :err:330:cmd !nothing:AppConnection:Server=.\SQLEXPRESS;Database=Cams2;Uid=sa;#

EL4 :err:374:BuildSQLCmd:Uncomment-full Error:System.Exception: Cannot create ActiveX component. 
at Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class) 
at Company.get_CompanyID() in c:\Projects\sqlCamSmoAdoCSplusDev\sqlCamSmoAdoCSplusData\Secure\Company.aspx.cs:line 401 
at Company.BuildSQLCmd(String StoredProcName, SqlConnection Conn, SqlTransaction tr, Boolean AutoParams) 
in c:\Projects\sqlCamSmoAdoCSplusDev\sqlCamSmoAdoCSplusData\Secure\Company.aspx.cs:line 346

return (string)Microsoft.VisualBasic.Interaction.GetObject("CompanyID", null);// line 401 error
if (cmd.Parameters.Contains("@CompanyID") & CompanyID != null)// line 346 error

EL3 :err:293:catch:Uncomment-full Error:System.NullReferenceException: 
Object reference not set to an instance of an object. 
at Company.GetDataTable(SqlConnection Conn, String SQLProc, String ParmName, String ParmValue) 
in c:\Projects\sqlCamSmoAdoCSplusDev\sqlCamSmoAdoCSplusData\Secure\Company.aspx.cs:line 275
EL4 :err:157:PL:Uncomment-full Error:System.NullReferenceException: 
Object reference not set to an instance of an object. at Company.Page_Load(Object sender, EventArgs e) 
in c:\Projects\sqlCamSmoAdoCSplusDev\sqlCamSmoAdoCSplusData\Secure\Company.aspx.cs:line 113

Open in new window

AttachedFileCS.txt
ASKER CERTIFIED SOLUTION
Avatar of homeshopper
homeshopper
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of homeshopper

ASKER

Managed to crack it, the error in the code. See Solution: