Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

BCP XML FileFormat error Invalid ordinal for field 2 Expand / Collapse
Author
Message
Posted Friday, October 1, 2010 11:22 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, August 28, 2014 1:45 AM
Points: 14, Visits: 81
Hi,

When creating xml fileformat its throwing me error "invalid ordinal".

when created non-xml file format, no error, and was also able to load data file into sql table. Not sure why bcp (Version: 10.50.1600.1) is not able to create xml file format.

C:\>BCP "MyGDB.dbo.Items_Import" format nul -f"C:\Ankit\Temp\BCP\ItemsMaster.xml" -x -w -T -S"(Local)"

SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Invalid ordinal for field 2 in xml format file.

Column_name Type Computed Length Prec Scale Nullable TrimTrailingBlanks FixedLenNullInSource Collation
Item Number varchar no 18 no yes no SQL_Latin1_General_CP1_CI_AS
Description1 nvarchar no 80 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
Description2 nvarchar no 80 yes (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
UM varchar no 3 yes yes yes SQL_Latin1_General_CP1_CI_AS

~ Ankit



Kindest Regards,

Ankit Peshwaria
Post #996867
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse