467,149 Members | 1,244 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,149 developers. It's quick & easy.

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.

Expand|Select|Wrap|Line Numbers
  1. ALTER PROCEDURE dbo.InsertTimeLog
  2. (
  3. @id [int],
  4. @dateEntered [smalldatetime] = '2/2/2000'
  5. )
  6. AS
  7. Begin
  8. INSERT INTO [dbo].[TimeLogEntered]
  9. VALUES (       @id,
  10.                       CONVERT(char, @dateEntered, 120))
  11. end 
@dateEntered gets a Use CONVERT error
Nov 4 '08 #1
  • viewed: 1119
Share:
1 Reply
ck9663
Expert 2GB
Check the structure of your table, relative to the value you're trying to insert.

-- CK
Nov 5 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Chris | last post: by
1 post views Thread by HD | last post: by
1 post views Thread by nicholas | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.