Need help with quote; double quote in line of code

Last post 06-08-2005 8:00 PM by RDowdall. 2 replies.

Sort Posts:

  • Need help with quote; double quote in line of code

    06-08-2005, 4:21 PM
    • Member
      169 point Member
    • RDowdall
    • Member since 06-02-2005, 8:56 AM
    • Atlanta
    • Posts 91


    Hello - I am needing some help with the quotes around the parameter in the sql statement below.

    Thanks


    Dim RptDay As String = Date.Now.ToString("dd")


    dadCalls =
    New MySqlDataAdapter("Select * from cdr where start_time = "   &   "'RptDay'", connIVR)

    RD

    The creator of the universe works in mysterious ways. But he uses a base ten counting system and likes round numbers.
    - Scott Adams
  • Re: Need help with quote; double quote in line of code

    06-08-2005, 4:31 PM
    • All-Star
      41,909 point All-Star
    • tmorton
    • Member since 08-06-2002, 9:37 PM
    • SE Pennsylvania, USA
    • Posts 6,974
    • ASPInsiders
      Moderator
    Try it like this instead:
    dadCalls = New MySqlDataAdapter("Select * from cdr where start_time = ?"), connIVR)
    dadCalls.Parameters.Add(New MySqlParameter("@StartTime", datetime)).Value = RptDay


    Terri Morton
    ASP.NET Website Manager, Neudesic
  • Re: Need help with quote; double quote in line of code

    06-08-2005, 8:00 PM
    • Member
      169 point Member
    • RDowdall
    • Member since 06-02-2005, 8:56 AM
    • Atlanta
    • Posts 91
    thanks
    RD

    The creator of the universe works in mysterious ways. But he uses a base ten counting system and likes round numbers.
    - Scott Adams
Page 1 of 1 (3 items)