Go Back > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor


Google search

For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
Installation Wizard into new VRC
Manual into existing VRC
Manual into new VRC
Total votes: 45

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 3rd May 2002, 00:15
alejandro's Avatar
alejandro alejandro is offline
Senior Member
Join Date: Feb 2002
Location: Madrid - Spain
Posts: 144
alejandro is on a distinguished road
Baan: IV c4 - DB: Oracle 8 - OS: Unix
Local PC File Dialog Box (Unix & W98)

This code is a continuation of this thread .

It will work for:

BaaN IV c4
Windows 98

In other environments not tested.

The thread related shows how to call a Server File Browser in BaaN

This code shows the windows dialog open file. It works to select a file or a folder. The code has two parts:

tccomfindwinf.exe: A VB script that must be compiled and stored in the server.

tccomfindwinf: 3GL script that has to be called to execute tccomfindwinf.exe and take the file or folder name selected.

Here is the code:
Attached Files
File Type: zip (3.0 KB, 575 views)

Last edited by ~Vamsi : 3rd May 2002 at 01:10.
Reply With Quote
Old 17th April 2003, 11:59
PeterH's Avatar
PeterH PeterH is offline
Join Date: Aug 2001
Location: Maastricht - Netherlands
Posts: 53
PeterH is on a distinguished road
Baan: Baan IV c4 - DB: Oracle 8 - OS: unix
I'd to make one change

To get the visual basic code working on a w2k system I had to make the following changes:

Original code:
Dim fname As String
filebox.lpstrFile = Space(255)

Changed to:
Dim fname As String * 255
filebox.lpstrFile = fname

Alejandro thanks.
Reply With Quote
Sponsored Links
Old 13th June 2003, 09:59
dorleta's Avatar
dorleta dorleta is offline
Senior Member
Join Date: Dec 2001
Location: Madrid - Spain
Posts: 134
dorleta is on a distinguished road
Baan: BaanIV - DB: All - OS: All
another solution maybe

I have down the java class to local probably it is not neccesary and with a little modification you can get a file in the server or local pc in all the systems win, unix...

code of the baan dll:
function extern string aemcs.expl.local.file()
	long dummy, fich, dummy2

	string destino(50)
	string bufer(80)
	dummy = remove.local.file("c:\tmp.txt")
	dummy = server2client("/interfaz/Explorador.class", "c:\Explorador.class", false, false)


	dummy2 = app_start("javaw Explorador", "c:\\", "", "", "")
	if dummy2 < 0 then
	destino = creat.tmp.file$()

	fich = -1

	while fich < 0 
		dummy = client2server("c:\tmp.txt", destino, false )
		while dummy < 0
			dummy = client2server("c:\tmp.txt", destino, false )
		fich =, "r")
		dummy = seq.gets(bufer, 1000, fich)
		while dummy < 0
			dummy = seq.gets(bufer, 1000, fich)



code of the java class:
import java.awt.*;
import java.awt.event.*;
import java.lang.*;

public class Explorador extends Frame

	public Explorador()
		this.addWindowListener	(new WindowAdapter(){
			public void windowClosing(WindowEvent e){

	public static void main(String args[])
	String Cadena = new String();

	Explorador f = new Explorador();
	FileDialog diag = new FileDialog(f, "Seleccionar Fichero", 0);;
	Cadena = diag.getDirectory() + diag.getFile();
			// para crear un puntero de lectura de el fichero es obligatorio
			// el bloque try ya que hace un throws a una excepción (ver ayuda)
	try {
		FileWriter fr1 = new FileWriter("c:\\tmp.txt");
		BufferedWriter bw = new BufferedWriter(fr1);
		PrintWriter salida = new PrintWriter(bw);
			// se recoge la excepción
	catch( fr1) {
	System.out.println("Archivo no encontrado: " + fr1);}
	catch( ioex) {};



Reply With Quote
Old 13th January 2005, 20:42
NPRao's Avatar
NPRao NPRao is offline
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,059
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
Latest feature ->
SSA ERP LN 6.1 Programmer's Guide
long ref string dirname )
This shows the Windows Browse For Folder dialog, to allow the user to select one new or existing folder (directory) on the client.

Arguments dirname
Output argument which will contain the full path of the directory selected by the user.

Return values
1 A directory selected by the user
0 No directory selected. Folder browser dialog canceled by the user.

-1 Error occurred

ttdllbw library function.
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
writing a log file from a Unix script pjohns Operating Systems & Databases 8 11th April 2003 21:52
.txt file - Notepad vs Wordpad popeye Tools Development 5 1st March 2003 00:59

All times are GMT +2. The time now is 12:05.

©2001-2017 - -