Baanboard.com

Go Back   Baanboard.com

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
26%
500 - 800 GB
3%
800 - 1200 GB
9%
1200 - 1500 GB
12%
1500 - 2000 GB
12%
> 2000 GB
21%
Total votes: 34

Baanboard at LinkedIn


Reference Content

 
ims.openfba()
By patvdv at 26 Feb 2008 - 21:57


ims.openfba()

Syntax

long ims.openfba(string buffer, long size, string type(2))

Description

Opens a Fixed Byte Array (FBA).

The following code fragment shows an example of how to create an FBA:

 string  buffer(1)       based
long size
long stream.id

size = 1024
alloc.mem(buffer, size)
stream.id = ims.openFBA(buffer, size, "rw")

Important

Do not reallocate buffer when it is already in use by an FBA. This will cause the Bshell to crash. In the code above, do not call an alloc.mem(buffer, newSize) after the FBA has been opened.

Arguments

buffer

Stores the byte array.

It may already contain information before the start of this function.

size

Size of the buffer.

type

The mode in which the byte array must be opened. This can be one of the following options:

  • "r": Open for reading. The current position is placed at the start of the byte array.
  • "w": Open for writing. The byte array is created if it does not already exist. The current position is placed at the start of the byte array.
  • "a": Open for writing. The byte array is created if it does not already exist. The current position is placed at the end of the byte array.
  • "x": Open for writing. This is the same as "w", except that the function fails if the byte array already exists.
  • "r+": Same as "r", but it can also be written to.
  • "w+": Same as "w", but it can also be read.
  • "a+": Same as "a", but it can also be read.
  • "x+": Same as "x", but it can also be read.

Return values

-1

Error, most probably bytearrray is not a valid stream or the byte array is full.

>0

Success. A byte array identifier was returned..

Context

3GL function

Related topics

0
No votes yet


All times are GMT +2. The time now is 17:11.


©2001-2018 - Baanboard.com - Baanforums.com