Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

BCP, CSV and ASP

I read the article on speed inserts on BCP. I want to use it with asp. I
am allowing the users to do csv imports in to there account to load a bill
of materials. The web server and SQL Server are two different machines.
Can I use BCP? Is it better to do it in a stored procedure or inline of
the asp? Also is there any increased maintanance on the transaction log
using BCP? Do you know of any examples of this type of process for someone
not familar with the level of programming? Thanks for sharing this great
idea.
[552 byte] By [Kevin] at [2007-11-9 17:48:08]
# 1 Re: BCP, CSV and ASP
kevin,

copy file from web server to database server, Then use bulk insert or bcp

msdn article url:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_impt_bcp_2e5s.asp

kk

"Kevin" <kevin.wise@mtifwb.com> wrote:
>
>I read the article on speed inserts on BCP. I want to use it with asp.
I
>am allowing the users to do csv imports in to there account to load a bill
>of materials. The web server and SQL Server are two different machines.
> Can I use BCP? Is it better to do it in a stored procedure or inline of
>the asp? Also is there any increased maintanance on the transaction log
>using BCP? Do you know of any examples of this type of process for someone
>not familar with the level of programming? Thanks for sharing this great
>idea.
kk at 2007-11-11 23:17:35 >
# 2 Re: BCP, CSV and ASP
Because of security I can't copy the file over is must be done from the web
server.

"kk" <kamisetty@email.com> wrote:
>
>kevin,
>
>copy file from web server to database server, Then use bulk insert or bcp
>
>msdn article url:
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_impt_bcp_2e5s.asp
>
>kk
>
>"Kevin" <kevin.wise@mtifwb.com> wrote:
>>
>>I read the article on speed inserts on BCP. I want to use it with asp.
> I
>>am allowing the users to do csv imports in to there account to load a bill
>>of materials. The web server and SQL Server are two different machines.
>> Can I use BCP? Is it better to do it in a stored procedure or inline
of
>>the asp? Also is there any increased maintanance on the transaction log
>>using BCP? Do you know of any examples of this type of process for someone
>>not familar with the level of programming? Thanks for sharing this great
>>idea.
>
Kevin at 2007-11-11 23:18:35 >
# 3 Re: BCP, CSV and ASP
Does the SQL box have access to the file on the web server?

"Kevin" <kevin.wise@mtifwb.com> wrote in message
news:3e26b0fe$1@tnews.web.dev-archive.com...
>
> Because of security I can't copy the file over is must be done from the
web
> server.
Larry Triezenberg at 2007-11-11 23:19:41 >
# 4 Re: BCP, CSV and ASP
"Larry Triezenberg" <ltriezenberg@pathsys.com> wrote:
>Does the SQL box have access to the file on the web server?
>
>"Kevin" <kevin.wise@mtifwb.com> wrote in message
>news:3e26b0fe$1@tnews.web.dev-archive.com...
>>
>> Because of security I can't copy the file over is must be done from the
>web
>> server.
>
>
No it does not. I don't think this is going to be a good solution mainly
due to the issues with the transaction log. I think the proper way to do
this is with a staging database (which we are not going to have) and then
transfer the data from that table to the final destination.
Kevin at 2007-11-11 23:20:35 >