| Author |
Xp_write for more than 1 field
|
|
| Robert 2005-07-12, 3:23 am |
| ASA 9.0.2.2451
I have a pod that reads a image ( larger than 32k) into 4 long binary
fields stored in my table.
How do I combine these fields and write the image to disk.
xp_write_file overwrites the file you write to so I cannot issue 4 write
commands.
The fields may not contain data and may be null.
I write 32k to each field, but if the image is only 64k big --> field 3and
4 are left empty or null.
Is there a way to combine the binary fields into 1 variable on ASA side and
use xp_write to write the variable to file
| |
| Robert 2005-07-12, 7:26 am |
| Ignore this .
I was trying to use xp_write_file in ultralite and not ASA.
Works fine in ASA just add the binaries together on the xp_write_file call
"Robert" <robert@cyberprop.com> wrote in message
news:42d384a4@forums
-2-dub...
> ASA 9.0.2.2451
> I have a pod that reads a image ( larger than 32k) into 4 long binary
> fields stored in my table.
> How do I combine these fields and write the image to disk.
> xp_write_file overwrites the file you write to so I cannot issue 4 write
> commands.
> The fields may not contain data and may be null.
> I write 32k to each field, but if the image is only 64k big --> field
> 3and 4 are left empty or null.
> Is there a way to combine the binary fields into 1 variable on ASA side
> and use xp_write to write the variable to file
>
>
>
| |
| Greg Fenton 2005-07-12, 9:23 am |
| Robert wrote:
> Ignore this .
> I was trying to use xp_write_file in ultralite and not ASA.
> Works fine in ASA just add the binaries together on the xp_write_file call
>
Why not use a single LONG BINARY field instead of 4 BINARY fields?
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
| Robert 2005-07-13, 3:23 am |
| I am not a C++ programmer and could not get the code to work. StreamReader
and StreamWriter.
Have to open table object and write into table.
I got the code to work using rp_dbt_binary which only allows 32k
Ideally I would prefer to write the whole image into 1 long binary field.
But we use what we can
| |
| Greg Fenton 2005-07-13, 9:23 am |
| Robert wrote:
> I am not a C++ programmer and could not get the code to work. StreamReader
> and StreamWriter.
Hmm...well I would suggest trying to get that code working. You might
try posting here asking for help. What happens down the road when you
get images that are greater than (4) 32K blocks?
The code is not hard code to write and once you get a working example
you will have a solution that is (a) designed well, (b) flexible and (c)
scales as the users' data grows.
Just a thought,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
|
|
|
|