Michael:

If you have access to the machine and are a sysadmin there's no 
problem.  You don't need to go to the trouble below.

However, assuming you are using an ISP, THEY can create a CFAS mapping for 
you, I'll call it "CFmapping", that points to a location that cannot be 
seen by their web server, or by you if you have FTP access.  Then they can 
put the CF template there (like the one below, I'll call it 
"qry_BulkInsert.cfm") with the CFQUERY set with a sysadmin account and know 
you won't be able to see the template, the directory structure, account 
name, or password.

YOU can then CFINCLUDE that template in YOUR application:

<CFINCLUDE TEMPLATE="/CFmapping/qry_BulkInsert.cfm">

and you're home free.

best,  paul


At 02:44 PM 12/9/00 -0400, you wrote:
>Hi!
>Thanks for all the help!!
>
>I don't quite understand how you did this.
>Did you create a custom tag, or did you
>just map an administrator's password?
>If you used a custom tag, how did you
>pass the local file?
>
>TIA,
>_________________________
>Michael Gagnon
>
>----- Original Message -----
>From: "paul smith" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Friday, December 08, 2000 4:10 PM
>Subject: Re: BULK INSERT - Access or ODBC incompatibility?
>
>
> > 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)
> >


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to