Welcome! Log In Create A New Profile

Advanced

HCreation

Posted by Mark 
Mark
HCreation
October 14, 2008 10:44AM
Hi folks,

I have created a small test window with a table on it and a button.

The button click runs the following code which creates a file and adds a row to it then
browses the file in the table.

----------------------------------------------------------------------------------------------------

lsFile is Data Source

HCancelDeclaration(lsFile)

// Data source
File is File Description
Item is Item Description

// Describe the file
File..Name = lsFile
File..Type = hFileNormal

// Describe column 1
Item..Name = "CODE"
Item..Type = hItemText
Item..Size = 3
Item..KeyType = hUniqueKey
HDescribeItem(File,Item)

// Describe column 2
Item..Name = "DESC"
Item..Type = hItemText
Item..Size = 20
HDescribeItem(File,Item)

// Validates the description of the file
HDescribeFile(File)

// Create the file (recognized because declared as data source)
HCreation(lsFile)

// Creating a record
lsFile.CODE = "L%"
lsFile.DESC = "Litres of Alcohol"
HAdd(lsFile)

BuildBrowsingTable("Table1",lsFile,taFillTable)

I thought that HCreation actually created a physical file on disk, however my I cant find any references to "lsFile" on my disk anywhere. Any Ideas or am I completely barking up the wrong red herring!

Tks

Mark


----------------------------------------------------------------------------------------------------

Marc De Swert
Re: HCreation
October 14, 2008 11:41AM
Yo Mark,

i just did what you describe
no problemo

the file is created in the project directory's exe-folder
data is filled in!

marc :xcool



Mark
Re: HCreation
October 14, 2008 02:05PM
Marc,

Thanx for looking at this, however I can't see the fi.e in my exe folder in fact I did a global search on my hard disk and cannot find any reference to lsfile anywhere, pretty odd huh!

Tks

Mark
Milton
Re: HCreation
October 14, 2008 09:15PM
Hi Mark,

It also worked for me - possibly it has to do with write permissions on your disk?

Milton
Mark
Re: HCreation
October 16, 2008 12:21PM
Milton,

Seems that for some reason the file created was set to hidden in the folder, therefore it was not obvious, doh!

Thanks for your interest.

Mark
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: