Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
| Search | Today's Posts | Mark Forums Read
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 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 August 12th, 2008, 09:55 AM
Authorized User
Join Date: Dec 2006
Location: chennai, tn, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error - Loading date field from flat file to sql


I have a column with the datetime datatype and trying to import the data from flatfile to sql server table. I'm getting the following error info.

An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Invalid character value for cast specification."....

I learnt in one of the blog that this could be reason probably where you have blank in the datefield column of flat file and the sql table can hold only NULL or valid date and it cannot accept blank.

In short, the flat file has a blank value for the corresponding sql server datetime column.

Pls. suggest if this is the known error, how to transform my data from flat file to sql server.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query a Sql Database Date Field feets Access VBA 3 October 18th, 2007 10:10 AM
Importing date field in a large txt file CongoGrey Access 2 July 10th, 2007 06:44 AM
Import delimited flat file into SQL Server 2000 DevCsharp C# 1 April 27th, 2005 11:52 PM
Error loading file bmains VS.NET 2002/2003 1 September 2nd, 2004 12:52 PM
error loading asp file vincentc Classic ASP Basics 1 September 3rd, 2003 01:01 AM

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