By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,766 Members | 1,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,766 IT Pros & Developers. It's quick & easy.

Insert and Update Procedures

P: 1
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
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
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.