all groups > sql server programming > november 2004 >
You're in the

sql server programming

group:

Bulk insert from a client


Bulk insert from a client Star
11/8/2004 11:42:59 PM
sql server programming:
Hi,

I'm trying to make a bulk insert from a client computer that is connected to
a SQL Server.
However, I have noticed that the files that I want to import need to be on
the server, instead of the
client. You may not have windows access to the server machine, so I don't
see the point of copying all the files to the server before importing the
data.

My question is: Is there anyway to import the files directly from the
client?

Thanks


Re: Bulk insert from a client Hari Prasad
11/9/2004 12:08:39 AM
Hi,

Yes you can. Provide the UNC name along with the file name

BULK INSERT dbo.MyTable FROM '\\YourPCName\YourPCShareName\YourFile.txt'

--
Thanks
Hari
SQL Server MVP

[quoted text, click to view]

Re: Bulk insert from a client Hari Prasad
11/9/2004 12:45:56 AM
Hi,

As soon as you login to Query Analyzer, you are into the SQL server machine,
So from there you need to acccess you computers share.

So create a new share for ur directory in which the file resides. After that
give previlage to the user for the share in which SQL server starts.

After that give that share name in Bulk insert followed with File name.


--
Thanks
Hari
SQL Server MVP


[quoted text, click to view]

Re: Bulk insert from a client Star
11/9/2004 1:31:37 AM
Hari, thanks for your answer.

I'm sorry for my ignorance, but what do you mean with YourPCShareName?

I just need to import the file which is located in the same folder where the
client is running (a regular .exe application)



[quoted text, click to view]

AddThis Social Bookmark Button