Insert and Update Procedures

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sturner333
    New Member
    • Nov 2008
    • 1

    Insert and Update Procedures

    I have 2 stored procedures tied to a dataset in vb 2008 for updating and inserting info in a datagrid. The Update works, insert does not. Error:
    Conversion failed when converting the varchar value '2009-11-02
    00:00:00 ' to data type bit.

    Code:
    ALTER PROCEDURE dbo.InsertTimeLog
    (
    @id [int],
    @dateEntered [smalldatetime] = '2/2/2000'
    )
    AS
    Begin
    INSERT INTO [dbo].[TimeLogEntered]
    VALUES (       @id,
                          CONVERT(char, @dateEntered, 120))
    end
    @dateEntered gets a Use CONVERT error
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Check the structure of your table, relative to the value you're trying to insert.

    -- CK

    Comment

    Working...