How to solve error "the specified value type is different to the current value type"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • romiverma
    New Member
    • Jun 2010
    • 11

    How to solve error "the specified value type is different to the current value type"

    hi,
    i have used sql2000 stored procedure with 2 date parameters to create crystal report 8.5. when i am sending date parameters from vb6 and calling the report, its giving error "the specified value type is different to the current value type"
    here is the code:
    With CrystalReport1
    .Connect = gconConnection
    .ReportFileName = App.Path & "\Receipt Reversal.rpt"
    .DiscardSavedDa ta = True
    .Destination = crptToWindow
    .WindowShowExpo rtBtn = True
    .WindowAllowDri llDown = True
    .StoredProcPara m(0) = "@DateFrom; " & "01/01/2010 00:00:01AM"
    .StoredProcPara m(1) = "@DateTo;" & "01/20/2010 11:59:59PM"
    .Destination = crptToWindow
    .WindowState = crptMaximized
    .Action = 1
    End With

    but its giving error like specified value type is not matching with current value type. i changed date format but still getting same. am using crystal reoprt component in vb6 to call crystal report. any help will be appreciated.
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    CR may be expecting the date values to be surrounded by delimeters like access does (#), or sql will accept single ticks (') around a date. See CR's help files on dates to check...



    Good Luck

    Comment

    • romiverma
      New Member
      • Jun 2010
      • 11

      #3
      hi thks for reply but i tried single quotes also, hash sign also, but still not working. searched on net yet no result. still waiting to get it resolved.

      Comment

      • vb5prgrmr
        Recognized Expert Contributor
        • Oct 2009
        • 305

        #4
        Did you check CR's help files? They have examples in the help files...



        Good Luck

        Comment

        • romiverma
          New Member
          • Jun 2010
          • 11

          #5
          Originally posted by vb5prgrmr
          Did you check CR's help files? They have examples in the help files...



          Good Luck
          yup i checked help files also but i didn't get information abt date parameters

          Comment

          • vb5prgrmr
            Recognized Expert Contributor
            • Oct 2009
            • 305

            #6
            Hmmm... Well hopefully someone can come along here and set you strait as it has been awhile since I used CR for anything...



            Good Luck

            Comment

            Working...