• Welcome, Guest. Please login.
 
August 25, 2019, 09:04:48 am

News:

Welcome to the SQLitening support forums!


slGetFile, loading a local file when in remote mode...

Started by Marc Giao, March 02, 2010, 12:32:49 am

Previous topic - Next topic

Marc Giao

Hi All,

When running in local mode slGetFile locates and loads a file from the local PC... perfect.

When running in remote mode slGetFile locates and loads a file from the server... perfect

Is it possible to run in remote mode and somehow get slGetFile to locate and load a file from a local PC? If not how would I load a local file so I can save it as  a blob, while running in remote mode?

Thanks for any help.

Marc

Fred Meier

Yes, you can switch back and forth between local and remote mode by using
slPushDatabasae, slSetProcessMods, and slPopDatabase.  Look at ExampleA.Bas
and study the L modchar in slSetProcessMods.

The below does a connect, switches to local mode, gets the data from a local
file and then switches back to remote mode.
   slConnect
   slPushDatabase
   slSetProcessMods "L0"
   slGetFile "Your file name here", YourStringVariable
   slPopDatabase
   slSetProcessMods "L1"


Marc Giao

 Thanks Fred,

I was thinking of all sorts of ways to solve this but didn't even think about slSet...,slPush.. and slPop  ::) old age is a sad thing, that's my excuse anyway and I am sticking to it  :)

All the best,

Marc

Rolf Brandt

Quoteold age is a sad thing,

I always try to calm myself down about memory leakages this way: As long I can remember Prof. Alzheimers first name (Alois) I am still ok!
I like to cook with wine - sometimes I even add it to the food.
www.rbsoft.eu