Results 1 to 3 of 3

Thread: [RESOLVED] unknown error during debugging

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2011
    Posts
    4

    Resolved [RESOLVED] unknown error during debugging

    Hi
    I'm migrating a solution made by 4 projects from vs2003 to vs2010 (with ASP and Crystal report)
    Now I took a very strange error... never seen in many years!

    I suppose it could be something related to "Public Shared Function" but I'm not sure , maybe something does not correspond between source code and compiled code as the error started when I updated the code.

    I'm debugging this class / function

    Imports sysLibrary

    Public Class cReports

    Public Shared Function GetReports(ByVal strDate1 As String, ByVal strDate2 As String, ByVal strCode As String, ByVal strRaggr As String, ByVal strUtente As String, ByVal IsDett As Boolean) As DataSet
    Dim strSQL As String

    strSQL = "uno"



    strSQL = "select distinct r.CCRP_COD_RAPPORTO COD, r.CCRP_COD_RAGGRUPP RAGGR, rp.CCRP_DESCRIZIONE DESCR, " & _
    "r.CCRP_DATA_RAPPORTO DATA_RAP, r.CCRP_NUM_PAG NPAGE, " & _
    "case when rp.CCRP_DETTAGLIO = 'S' then 1 else 0 end ISDETT " & _
    "from CCRP_REPORTS r, CCRP_REPORTS_PARAM rp, CCRP_RECIP_REPORTS rr, CCUR_UTENTI_RECIP ur " & _
    "where r.CCRP_COD_RAPPORTO = rp.CCRP_COD_RAPPORTO " & _
    "and r.CCRP_COD_RAGGRUPP = rp.CCRP_COD_RAGGRUPP " & _
    "and rr.ccrp_cod_rapporto = rp.ccrp_cod_rapporto " & _
    "and rr.ccrp_cod_raggrupp = rp.ccrp_cod_raggrupp " & _
    "and rr.CCRP_RECIPIENT = ur.CCUR_RECIPIENT " & _
    "and ur.CCUR_UTENTE like 'CO03298' " & _
    "and r.CCRP_COD_RAPPORTO like '" & strCode & "' " & _
    "and r.CCRP_COD_RAGGRUPP like '" & strRaggr & "'"


    When I arrive in the first instrucion (strSQL = "uno") the variable strSQL is Nothing

    I run the "strSQL = "uno""


    and "magically" the string strSQL contains

    "select distinct r.CCRP_COD_RAPPORTO COD, r.CCRP_COD_RAGGRUPP RAGGR, rp.CCRP_DESCRIZIONE DESCR, r.CCRP_DATA_RAPPORTO DATA_RAP, r.CCRP_NUM_PAG NPAGE, case when rp.CCRP_DETTAGLIO = 'S' then 1 else 0 end ISDETT from CCRP_REPORTS r, CCRP_REPORTS_PARAM rp, CCRP_RECIP_REPORTS rr, CCUR_UTENTI_RECIP ur where r.CCRP_COD_RAPPORTO = rp.CCRP_COD_RAPPORTO and r.CCRP_COD_RAGGRUPP = rp.CCRP_COD_RAGGRUPP and rr.ccrp_cod_rapporto = rp.ccrp_cod_rapporto and rr.ccrp_cod_raggrupp = rp.ccrp_cod_raggrupp and rr.CCRP_RECIPIENT = ur.CCUR_RECIPIENT and ur.CCUR_UTENTE like '' and r.CCRP_COD_RAPPORTO like '%' and r.CCRP_COD_RAGGRUPP like '%'"


    It seems I executed 2 instrutions not only one!!! and I've anyway due strange errors
    1)Why strSQL is set before executing the secopnd instruction with " select distinct.... " ?
    2)Anyway, the select distinct of the code contains ur.CCUR_UTENTE like 'CO03298 BUT i found and ur.CCUR_UTENTE like '' (in other words I still have the original code, before my update)



    I've already tried to clean webcache, restart vs2010 and PC, recompile entire solution and also reset the compile configuration to DEBUG (from Active(Debug) , but nothng is changed

    Thanks in advance for your time!

  2. #2

    Thread Starter
    New Member
    Join Date
    Oct 2011
    Posts
    4

    Re: unknown error during debugging

    Quote Originally Posted by roberto9911 View Post
    Hi
    I'm migrating a solution made by 4 projects from vs2003 to vs2010 (with ASP and Crystal report)
    Now I took a very strange error... never seen in many years!

    I suppose it could be something related to "Public Shared Function" but I'm not sure , maybe something does not correspond between source code and compiled code as the error started when I updated the code.

    I'm debugging this class / function

    Imports sysLibrary

    Public Class cReports

    Public Shared Function GetReports(ByVal strDate1 As String, ByVal strDate2 As String, ByVal strCode As String, ByVal strRaggr As String, ByVal strUtente As String, ByVal IsDett As Boolean) As DataSet
    Dim strSQL As String

    strSQL = "uno"



    strSQL = "select distinct r.CCRP_COD_RAPPORTO COD, r.CCRP_COD_RAGGRUPP RAGGR, rp.CCRP_DESCRIZIONE DESCR, " & _
    "r.CCRP_DATA_RAPPORTO DATA_RAP, r.CCRP_NUM_PAG NPAGE, " & _
    "case when rp.CCRP_DETTAGLIO = 'S' then 1 else 0 end ISDETT " & _
    "from CCRP_REPORTS r, CCRP_REPORTS_PARAM rp, CCRP_RECIP_REPORTS rr, CCUR_UTENTI_RECIP ur " & _
    "where r.CCRP_COD_RAPPORTO = rp.CCRP_COD_RAPPORTO " & _
    "and r.CCRP_COD_RAGGRUPP = rp.CCRP_COD_RAGGRUPP " & _
    "and rr.ccrp_cod_rapporto = rp.ccrp_cod_rapporto " & _
    "and rr.ccrp_cod_raggrupp = rp.ccrp_cod_raggrupp " & _
    "and rr.CCRP_RECIPIENT = ur.CCUR_RECIPIENT " & _
    "and ur.CCUR_UTENTE like 'CO03298' " & _
    "and r.CCRP_COD_RAPPORTO like '" & strCode & "' " & _
    "and r.CCRP_COD_RAGGRUPP like '" & strRaggr & "'"


    When I arrive in the first instrucion (strSQL = "uno") the variable strSQL is Nothing

    I run the "strSQL = "uno""


    and "magically" the string strSQL contains

    "select distinct r.CCRP_COD_RAPPORTO COD, r.CCRP_COD_RAGGRUPP RAGGR, rp.CCRP_DESCRIZIONE DESCR, r.CCRP_DATA_RAPPORTO DATA_RAP, r.CCRP_NUM_PAG NPAGE, case when rp.CCRP_DETTAGLIO = 'S' then 1 else 0 end ISDETT from CCRP_REPORTS r, CCRP_REPORTS_PARAM rp, CCRP_RECIP_REPORTS rr, CCUR_UTENTI_RECIP ur where r.CCRP_COD_RAPPORTO = rp.CCRP_COD_RAPPORTO and r.CCRP_COD_RAGGRUPP = rp.CCRP_COD_RAGGRUPP and rr.ccrp_cod_rapporto = rp.ccrp_cod_rapporto and rr.ccrp_cod_raggrupp = rp.ccrp_cod_raggrupp and rr.CCRP_RECIPIENT = ur.CCUR_RECIPIENT and ur.CCUR_UTENTE like '' and r.CCRP_COD_RAPPORTO like '%' and r.CCRP_COD_RAGGRUPP like '%'"


    It seems I executed 2 instrutions not only one!!! and I've anyway due strange errors
    1)Why strSQL is set before executing the secopnd instruction with " select distinct.... " ?
    2)Anyway, the select distinct of the code contains ur.CCUR_UTENTE like 'CO03298 BUT i found and ur.CCUR_UTENTE like '' (in other words I still have the original code, before my update)



    I've already tried to clean webcache, restart vs2010 and PC, recompile entire solution and also reset the compile configuration to DEBUG (from Active(Debug) , but nothng is changed

    Thanks in advance for your time!

    OK found!!!! it was a different directory for one project of the four: documents instead of wwwroot!!!

  3. #3
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,458

    Re: unknown error during debugging

    In the upper right hand corner is a menu item called "Thread Tools" and it has a drop down to mark this thread "Resolved". That keeps members from looking at the thread to help and then seeing there was a solution.
    Please remember next time...elections matter!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width