FlowHeater - The Data Import / Export Specialist
See also the general examples available, which may answer your question: Hello World 1 / 2 / 3 , format numbers as character strings , simple If-Then-Else , complex If-Then-ElseIf , filtering and grouping data , consolidate grouped values

Read side link

  • JD Cox
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 4 months ago #2471 by JD Cox
Read side link was created by JD Cox
Hey guys, a copy of our current WMS resides on each user’s terminal server desktop. I want to connect to a table (not linked) on the read side stored there.

I tried > C:\Documents and Settings\%userprofile%\Desktop\MyDateBase.mdb< in the Login information with negative results.

Is there a way to always connect to the user’s desktop copy?

Thanks JD

Please Log in or Create an account to join the conversation.

More
7 years 4 months ago - 7 years 4 months ago #2472 by FlowHeater-Team
Replied by FlowHeater-Team on topic Read side link
Hi JD,

Environment variables are not supported for parameters directly in FlowHeater but you can use FlowHeater Parameters instead.

There are two ways to overtake environment variables at definition start time.
  1. In the Batch Module you could set them on command line with the command line option /SetParameter
    e.g. FHBatch.exe /SetParameter UP=%USERPROFILE% Your-Import-Export-Definition.fhd

  2. With .Net Script Heater and the simple Script below. You have to switch “Exceute when” to “Start” in the Heater options.
The two solution above sets the FlowHeater Parameter $UP$ with the content of the environment variable %USERPROFILE% at start time. This parameter can be used in the filename for the Access Database .

NOTE: You have to use $UP$\Desktop\MyDataBase.mdb instead of C:\Documents and Settings\%userprofile%\Desktop\MyDateBase.mdb


C# .NET Script to obtain environment variables
Code:
public object DoWork() { // Set the FlowHeater Parameter $USERPROFILE$ with the content of the environment variable %USERPROFILE% Parameter["UP"].Value = Environment.GetEnvironmentVariable("USERPROFILE"); // return value not required at "Start" return null; }


Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Attachments:
Last edit: 7 years 4 months ago by FlowHeater-Team.

Please Log in or Create an account to join the conversation.

  • JD Cox
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
7 years 4 months ago #2473 by JD Cox
Replied by JD Cox on topic Read side link
Robert,

That works great…as always, I can’t thank you enough. With our growing company this will be a great asset for us by allowing multiple users to run the end of day tasks simultaneously as opposed to one user. :)

JD

Please Log in or Create an account to join the conversation.

Time to create page: 0.416 seconds

other Languages

de

FlowHeater Home

de en

Imprint/Contact

Privacy Statement

Copyright © 2009-2023 by FlowHeater GmbH.
All rights reserved.

Follow us on

twitter  facebook

YouTube

 de en