Here are some issues I ran into recently:

1. BULK INSERT has to run under a sysadmin account.  For my user, I setup a 
CFAS mapping to a template my user could not access.  The CFQUERY in THAT 
template had the BULK INSERT in it and have sysadmin access.

2. If you CFINCLUDE something like the following:

<cfquery name="InsertInitial" DATASOURCE="#DSN#" USERNAME="#user#" 
PASSWORD="#pass#">
BULK INSERT jobsINITIAL
FROM '#File.ServerDirectory#\#FILE.ServerFile#'
WITH
(
FIELDTERMINATOR='|',
ROWTERMINATOR='
'
)
</cfquery>

it will fail

You need to change ROWTERMINATOR='
'
to
ROWTERMINATOR='#chr(13)##chr(10)#'

HTH

best,  paul

PS> 3. You cannot have a Identity column in the table you're inserting to.
And the number and kind of columns in the table must exactly match that in 
the CSV file.  (I think BCP can work-around these - but I don't know its use)




At 12:23 PM 12/8/00 -0400, you wrote:
>Hi!
>
>I am using the SQL7's  "BULK INSERT", but I get the following error:
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to