Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server BULK INSERT COLLATION
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Server BULK INSERT COLLATION
Miscellaneous
Thread ID:
00703486
Message ID:
00703486
Views:
58
I have a 1 column or 1 field text file. I created with the followng Visual FoxPro command: COPY TO j:\sqlbcp\sqlbcp.txt TYPE DELIMITED WITH "" FIELDS Act_Unique

Act Unique is a text field.

I am issuing the following SPT command in Visual FoxPro:

cSQL = [BULK INSERT MCS.dbo.Activity ] + ;
[FROM 'e:\SQLBCP\SQLBCP.txt' ] + ;
[WITH (DATAFILETYPE = 'char', ] + ;
[ FORMATFILE = 'e:\SQLBCP\SQLBCP.fmt')]

nResult = SQLEXEC((nSQLHandle, cSQL)

I am using the following SQL Format File:

8.0
1
1 SQLCHAR 0 2 "\r\n" 1 ACT_UNIQUE SQL_Latin1_General_CP1_CI_AS

For my import field in SQL I have the collation set to which is: SQL_Latin1_General_CP1_CI_AS
I have checked the above several times.

I am receiving the error: Cannot perform bulk insert. Invalid Collation name for source column 1 in format file...

I have tried other Collation names making sure the collation set in SQL is the same as stated in the Format File.

Any help would be appreciated.
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Next
Reply
Map
View

Click here to load this message in the networking platform