locked
Two errors - 'Sqlhelper not declared' and 'referenced component Microsoft.ApplicationBlocks.Data not found RRS feed

  • Question

  • User-501297529 posted

     I received these two errors: 'Sqlhelper not declared' and 'referenced component Microsoft.ApplicationBlocks.Data not found' for the code below. What do I need to correct these errors.

     

    Imports Microsoft.ApplicationBlocks.Data
    Imports System.Configuration.ConfigurationSettings
    
    Namespace AFA.Data
        Public Class Sql
            Public Shared Function GetMemberByUsernamePassword(ByVal username As String, ByVal password As String)
                Return SqlHelper.ExecuteScalar(AppSettings("Connection"), CommandType.StoredProcedure, "GetMemberByUsernamePassword", username, password)
            End Function
            Public Shared Function GetContentByContentId(ByVal contentId As Integer) As SqlClient.SqlDataReader
                Return SqlHelper.ExecuteReader(AppSettings("Connection"), "PCMS_GetContentById", contentId)
            End Function
            Public Shared Function PerformSearch(ByVal search As String) As DataSet
    
                Return SqlHelper.ExecuteDataset(AppSettings("Connection"), "PCMS_FreeText", search)
            End Function
        End Class
        Public Class Forms
    
        End Class
    End Namespace


     

    Friday, September 25, 2009 4:10 PM

Answers

  • User-644392667 posted

    If it is in your 'bin' folder than you can browse to your bin folder when you select 'Add Reference' (click on the Browse tab). Select the dll and click 'OK'.

    :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 28, 2009 10:32 AM

All replies

  • User-644392667 posted

    How are you accessing the ApplicationBlocks? They are not (if I remember correctly) strongly-typed by default, so you need to either

    1 - put the .dll in the bin folder of your website

    2 - give them a strong name and install them into your GAC

    I would suggest #1 for now...

    Hope that helps...

    m

    Friday, September 25, 2009 4:29 PM
  • User-501297529 posted

    It does help. I see Microsoft.ApplicationBlocks.Data.dll in the bin folder but I still get that blue squiggly line that says it can't be found. Is there something else I am missing. 

    Friday, September 25, 2009 4:35 PM
  • User-644392667 posted

    Have you added a 'reference' to it in the project? Otherwise it will pretend that it does not exist...

    Friday, September 25, 2009 4:50 PM
  • User-501297529 posted

     yes i see it in the reference but there is a warning symbol next to it(a yellow triangle with a exclamation point inside of it). What does that mean. It's almost like it doesn't recognize it in References.

    Friday, September 25, 2009 5:00 PM
  • User-644392667 posted

    Does it tell you when you hover over it or right-click it? Or even double-click. It definitely means that it is somehow being confused, hopefully that will tell you why...

    You might try removing and readding it to see if that helps...

    Friday, September 25, 2009 5:10 PM
  • User-501297529 posted

    Does it tell you when you hover over it or right-click it? Or even double-click. It definitely means that it is somehow being confused, hopefully that will tell you why...

    You might try removing and readding it to see if that helps...

     

     

    All it does when I right-click on it says Remove or Properties. I removed it and now when I go to Add references I can't find it anymore. How do I re-add it?

    Monday, September 28, 2009 10:08 AM
  • User-644392667 posted

    If it is in your 'bin' folder than you can browse to your bin folder when you select 'Add Reference' (click on the Browse tab). Select the dll and click 'OK'.

    :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 28, 2009 10:32 AM
  • User-501297529 posted

     It worked. Thank you

    Monday, September 28, 2009 10:59 AM
  • User-644392667 posted

    you bet!

    Monday, September 28, 2009 3:21 PM