Adding date value in sql

Discussion in 'Visual Basic ( VB )' started by bouki, Mar 6, 2011.

  1. bouki

    bouki New Member

    Joined:
    Apr 9, 2010
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    When i try to add this field to a database in sql i get this error "Incorrect sysntax near 3

    I know this is a simple error but i cannot figure it out

    Code:
     cmd.CommandText = "insert into borrow (ISBNno, membername, Dateissued) values ('" & cbisbn.Text & "', '" & cbmember.Text & "', # " & DateValue(Now) & "#  )"
           
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice