==SOS==passing date to a SQL procedure

Results 1 to 2 of 2

Thread: ==SOS==passing date to a SQL procedure

  1. #1
    Desperate Help Seeker Guest

    Default ==SOS==passing date to a SQL procedure

    i want to pass on a form variable to the stored procedure<BR>the field in the stored proc is of the type "datetime"<BR>wat i am passing is textbox content (e.g. 01/01/00)<BR>i am getting a cannot conver t varchar to datetime error..<BR>Plz can any1 can help me out... help needed urgently<BR>if poss plz send an example<BR>thnx in advance<BR>pari@netesolutions.com

  2. #2
    lagerBoy Guest

    Default RE: ==SOS==passing date to a SQL procedure

    If you are using Access, you need to surround dates with pound signs (#). With most other databases, including SQL Server 7, dates are surrounded with apostrophes (&#039) and are treated like strings.So a SQL query might look like this:<BR><BR>&#060;%<BR> sql = "select field from table where datefield &#062; &#039" & dateVar & "&#039"<BR>%&#062;<BR><BR><BR><BR>

Posting Permissions

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