Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2003, 08:25 AM
Authorized User
 
Join Date: Nov 2003
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can't delete record

Hi,

I working on an application and I have inserted some data into a table within a sql database, and the date has obviously been entered in the wrong format, the problem is I can't amend or delete the record from the table, everytime I click away from the record I get the following error:

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

Any ideas on how I can remove this record

Many thanks
Peter

 
Old November 27th, 2003, 09:49 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Press Esc, so the record is not inserted after all???



---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old November 27th, 2003, 10:09 AM
Authorized User
 
Join Date: Nov 2003
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The record is already inserted I can't seem to delete it

 
Old November 27th, 2003, 01:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Right. I thought you were still in the EM trying to insert a record.

You can delete the record through code. Open the Query Analyser, and execute the code in the offending database:

DELETE FROM MyTable WHERE IDColumn = IDOfOffendingRecord.

When you press F5, the code will run and the record will be deleted.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete a record from a form? dstein4d Access VBA 8 August 24th, 2007 12:09 PM
Delete a record row, not just the record. Coby Access VBA 1 April 30th, 2007 06:29 AM
Trying to delete a record... Can't do it... lguzman Access VBA 11 August 13th, 2004 12:41 PM
automatic record delete. joeore Beginning PHP 5 April 29th, 2004 11:27 AM
Delete record but how? scifo Beginning PHP 3 August 1st, 2003 12:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.