Results 1 to 3 of 3

Thread: access to sql

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Melbourne
    Posts
    2

    access to sql

    Hi All,

    I am pretty new to sql server and can not find anything on the net about the error i'm having. My vb program was using an access database but I have now converted to sql 7.

    I am getting an error when trying to display the data in a flex grid. It works in access but not in sql 7.

    The bit of code i seem to have a problem is

    pstRefunds1 = "Select * from tblrefunds"
    pstRefunds1 = pstRefunds1 & " where refund_date > #" & Format(txtdate, "mm/dd/yy") & "#"
    pstRefunds1 = pstRefunds1 & " order by refund_id"

    I am getting a run time error : Line 1 error near '#'

    can someone tell what is wrong or direct me to a site that can help.

    thanks

  2. #2
    Hyperactive Member Granty's Avatar
    Join Date
    Mar 2001
    Location
    London
    Posts
    439
    SQL Server doesnt use # as the date identifier.

    I believe it's a single quote instead.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Melbourne
    Posts
    2
    omg,

    problem solved,

    I spent hrs on the net and couldn't find anything.

    5 mins here and got the answer.

    thanks

    buddy

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