Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question regarding dynamic calls

Status
Not open for further replies.

Paul7905

MIS
Jun 29, 2000
205
US
I just spent the last 4 weeks developing an Access '97 application using a workstation with Windows '98.&nbsp;&nbsp;One of the things this application does is to dynamically call another application to print thermal bar code labels.&nbsp;&nbsp;The application tested out fine on the '98 box.<br><br>Yesterday I migrated the application up to our Compaq 3000 server running Windows NT 4.0.&nbsp;&nbsp;Alas, when testing the application there, the call to the label printing application failed (a window pops up with the script &quot;File not Found&quot; (no other information, I don't even know what application is isuing this window; the &quot;file&quot; that is &quot;not found&quot; is not shown in the window either).<br><br>Carefully checking, I made certain that the file and path-names were correct.&nbsp;&nbsp;Stymied and baffled, I finally went to the DOS prompt and looked at DOS file names.&nbsp;&nbsp;Out of desperation, I modified the Visual Basic code in my application to use the DOS file name instead of the Long file name and the call worked.&nbsp;&nbsp;<br><br>Now I am wondering if there is something unique about Windows NT, a parameter or something that has to be set in order to use long file names in dynamic calls ?&nbsp;&nbsp;Can anyone shed any light on this?&nbsp;&nbsp;<br><br>The following shows the original call (that works fine on Windows '98 but fails on NT 4.) and the call using the DOS file name that works.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br><br>**ORIGINAL CALL THAT WORKS ON '98 BUT FAILS ON NT 4.0 :<br><br>Dim stAppName As String<br><br>stAppName = &quot;C:\Program Files\BarTender\bartend.exe&quot;&quot;/f=C:\PROGRAM <br>&nbsp;FILES\BarTender\Excel Formats\FARM LIBRARY LABEL 4X2.BTW/FP/X&quot;<br><br>Call Shell(stAppName, 1)<br><br><br>**REVISED CALL ON NT 4.0 THAT WORKS (USING DOS FILE NAME):<br><br>Dim stAppName As String<br><br>&nbsp;&nbsp;&nbsp;stAppName = &quot;C:\Program Files\BarTender\bartend.exe&quot;&quot;/f=C:\PROGRAM <br>&nbsp;FILES\BarTender\Excel Formats\FARML0~1/FP/X&quot;<br><br>Call Shell(stAppName, 1)<br><br>Where &quot;FARML0~1&quot; is the DOS file name&nbsp;&nbsp;........&nbsp;&nbsp;this seems crazy to me, but it works..........&nbsp;&nbsp;&nbsp;any ideas as to why ?&nbsp;&nbsp;<br><br>Paul
 
One thing I noticed is that is no space between the end of the program name and the &quot;/f&quot; command.<br>&quot;C:\Program Files\BarTender\bartend.exe&quot;&quot;/f=C:\PROGRAM <br>----------------------------------------^ Here<br><br>Is that cause you re-typed it in here?<br>If you debug.printed that out is would be<br>C:\Program Files\BarTender\bartend.exe/f=C:\PROGRAM...<br><br>So it does not know where the program name ends and the parameters start.<br>should'nt that be<br>&quot;C:\Program Files\BarTender\bartend.exe&quot; & &quot; /f=C:\PROGRAM....<br>-----------------------------------------^ Space before /F <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
I went to Seagull's WEB site<br>here is what you are doing and they have a space<br><br>Shell(&quot;bartend.exe&nbsp;&nbsp;/f=ucc-ean128.btw&nbsp;&nbsp;/p&quot;)<br><br>Also just a Note:<br>I would not run an Application on your Server.<br>First of all the foreground priority is set low by default. Anything that is running on the desktop of your server is going to run very slow. And it will slow the performance of the server down.<br><br>Or did you make it a Process that is running in the Services Icon in Control Panel?<br><br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top