let the user decide

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sase m via DotNetMonster.com

    #1

    let the user decide


    I want to let the user decide for the date in the query. I want to sort the
    database and put it in the datagrid.
    I wrote this query :

    SELECT *FROM table WHERE date BETWEEN #27/6/2005 20:20:30# and #28/6/2005
    20:20:30#
    And it works
    But I want to put two MaskedBoxs and let the user decide for the date
    I know how to do it with one variable but for two, please some one help me
  • Lucas Tam

    #2
    Re: let the user decide

    "sase m via DotNetMonster.c om" <forum@DotNetMo nster.com> wrote in
    news:52041C4FE2 06D@DotNetMonst er.com:
    [color=blue]
    >
    > I want to let the user decide for the date in the query. I want to
    > sort the database and put it in the datagrid.
    > I wrote this query :
    >
    > SELECT *FROM table WHERE date BETWEEN #27/6/2005 20:20:30# and
    > #28/6/2005
    > 20:20:30#
    > And it works
    > But I want to put two MaskedBoxs and let the user decide for the date
    > I know how to do it with one variable but for two, please some one
    > help me[/color]


    FYI, take a look at SQLParameters.. . using SQLParameters will prevent
    malcious data from being entered into the SQL command. It'll also allow you
    to specify dynamic parameters easily.

    --
    Lucas Tam (REMOVEnntp@rog ers.com)
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/

    Comment

    • Cor Ligthert [MVP]

      #3
      Re: let the user decide

      Sase,

      See this simple sample on our site (there is as well another parameter
      sample)



      I hope this helps,

      Cor


      Comment

      Working...