Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BCP from Foxpro
Message
From
14/01/2008 08:24:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
12/01/2008 20:53:58
Suhas Hegde
Dental Surgeon
Sirsi, India
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
MS SQL Server
Miscellaneous
Thread ID:
01281359
Message ID:
01281543
Views:
13
>hi,
>
>What i am trying to do is
>
>Copy the file from server(remote) to the Drive(destination)
>
>There is no Shares of drives.
>
>So i think i need BCP or textcopy for the same . or Might be a C# assembly ?
>
>Will try it with BCP if not will write out a C# assembly.
>
>Any other Ideas ?
>
>Storage:
>
>
>1) Client machine : Different Domain than Server
>2) Can interact only through services with the server.
>3) The file can be a Photo, or Fax doc ,or something like
>4) The file name (with path) is stored in the Server for retrival of the Image or Photo
>
>something like "Select * from openrowset(BULK 'PATH',single_blob) as A
>I also tried "Insert into openrowset('MSDASQL.1,'c:\';'';'','c:\test\data.jpg') select f1 from ##foo1 " with the Microsoft Text driver
>
>5) I want to do the reverse. of the select ; Write to the file.
>
>6) think of the control You will get. Infact updating the server would be easy , without the use of FTP or something else(of course you will need to be logged in with admin prev or atleast must be able to see the drive)
>
>
>Suhashegde

Suhas,
I'm not sure I understood:) If you mean you're trying to write out to a disk file on server that you don't have access (since I don't know how to use bcp):

-I would go with a C# assembly marking it unsafe that would write the file out and add it as a procedure (IOW a C# based procedure in SQL server).
-Try SQL2008 which has the capability of specifying external path for image storage rather than in database itself. Files would be already on the disk and there are ways accessing lowlevel (SQL2008 docs detail how to do).

If it's not about writing files on to disk on server than you could do it with SPT,ADO. Since the code I pointed didn't help I assume you mean writing the file out to disk on server.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform