Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Add Image

5 posts in General Discussion Last posting was on 2006-07-11 11:23:59.0Z
leo Posted on 2006-07-10 13:10:03.0Z
Sender: 1189.44b25147.1804289383@sybase.com
From: leo@aalborg-industries.com.br
Newsgroups: ianywhere.public.general
Subject: Add Image
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <44b251ab.118c.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Jul 2006 06:10:03 -0700
X-Trace: forums-1-dub 1152537003 10.22.241.41 (10 Jul 2006 06:10:03 -0700)
X-Original-Trace: 10 Jul 2006 06:10:03 -0700, 10.22.241.41
Lines: 6
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5499
Article PK: 1543

How add image in the Adaptive Server Anywhere 6.0.4.3594???

Because in the Adaptive Server Anywhere 9 the comand is :
"update scq_chamado_raiox
set croqui = xp_read_file( 'c:\teste.jpg' )
where num_solicitacao = 4;"


Reg Domaratzki (iAnywhere Solutions) Posted on 2006-07-10 14:09:25.0Z
From: "Reg Domaratzki \(iAnywhere Solutions\)" <FirstName.LastName@ianywhere.com>
Newsgroups: ianywhere.public.general
References: <44b251ab.118c.1681692777@sybase.com>
Subject: Re: Add Image
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: rdomarat-xp.sybase.com
Message-ID: <44b25e1f$1@forums-2-dub>
X-Original-Trace: 10 Jul 2006 07:03:11 -0700, rdomarat-xp.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Jul 2006 07:03:12 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Jul 2006 07:09:25 -0700
X-Trace: forums-1-dub 1152540565 10.22.108.75 (10 Jul 2006 07:09:25 -0700)
X-Original-Trace: 10 Jul 2006 07:09:25 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5501
Article PK: 1539

xp_read_file was added in v7. Your options are :

1) Upgrade to a more recent version of ASA.
2) Do it the old fashion way using fopen(), fread(), and fclose() and then
use the buffer as your parameter. Depending on the interface you're using
to access the db, this, the SQL specific code will be different, but here's
the basic C Code to read a file into a buffer :

FILE * pFile;
long lSize;
char * buffer;

pFile = fopen ( "myfile.txt" , "rb" );
if (pFile==NULL) exit (1);

// obtain file size.
fseek (pFile , 0 , SEEK_END);
lSize = ftell (pFile);
rewind (pFile);

// allocate memory to contain the whole file.
buffer = (char*) malloc (lSize);
if (buffer == NULL) exit (2);

// copy the file into the buffer.
fread (buffer,1,lSize,pFile);

/*** the whole file is loaded in the buffer. ***/

// terminate
fclose (pFile);
free (buffer);

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swd/base.do
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"

<leo@aalborg-industries.com.br> wrote in message
news:44b251ab.118c.1681692777@sybase.com...
> How add image in the Adaptive Server Anywhere 6.0.4.3594???
>
> Because in the Adaptive Server Anywhere 9 the comand is :
> "update scq_chamado_raiox
> set croqui = xp_read_file( 'c:\teste.jpg' )
> where num_solicitacao = 4;"


leo Posted on 2006-07-10 19:30:18.0Z
Sender: 1189.44b25147.1804289383@sybase.com
From: leo@aalborg-industries.com.br
Newsgroups: ianywhere.public.general
Subject: Re: Add Image
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <44b2aaca.16c2.1681692777@sybase.com>
References: <44b25e1f$1@forums-2-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Jul 2006 12:30:18 -0700
X-Trace: forums-1-dub 1152559818 10.22.241.41 (10 Jul 2006 12:30:18 -0700)
X-Original-Trace: 10 Jul 2006 12:30:18 -0700, 10.22.241.41
Lines: 64
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5503
Article PK: 1542

Ok... Thanks

But I don´t use C. If you have the comand to ASP.NET in
C#, could you send it to me please ???
If I install in the same machine Version 9 and 6, Will this
comand "xp_real_read_file" work ???

> xp_read_file was added in v7. Your options are :
>
> 1) Upgrade to a more recent version of ASA.
> 2) Do it the old fashion way using fopen(), fread(), and
> fclose() and then use the buffer as your parameter.
> Depending on the interface you're using to access the db,
> this, the SQL specific code will be different, but here's
> the basic C Code to read a file into a buffer :
>
> FILE * pFile;
> long lSize;
> char * buffer;
>
> pFile = fopen ( "myfile.txt" , "rb" );
> if (pFile==NULL) exit (1);
>
> // obtain file size.
> fseek (pFile , 0 , SEEK_END);
> lSize = ftell (pFile);
> rewind (pFile);
>
> // allocate memory to contain the whole file.
> buffer = (char*) malloc (lSize);
> if (buffer == NULL) exit (2);
>
> // copy the file into the buffer.
> fread (buffer,1,lSize,pFile);
>
> /*** the whole file is loaded in the buffer. ***/
>
> // terminate
> fclose (pFile);
> free (buffer);
>
> --
> Reg Domaratzki, Sybase iAnywhere Solutions
> Sybase Certified Professional - Sybase ASA Developer
> Version 8 Please reply only to the newsgroup
>
> iAnywhere Developer Community :
> http://www.ianywhere.com/developer iAnywhere Documentation
> : http://www.ianywhere.com/developer/product_manuals ASA
> Patches and EBFs : http://downloads.sybase.com/swd/base.do
> -> Choose SQL Anywhere Studio
> -> Set filter to "Display ALL platforms IN ALL MONTHS"
>
>
> <leo@aalborg-industries.com.br> wrote in message
> news:44b251ab.118c.1681692777@sybase.com...
> > How add image in the Adaptive Server Anywhere
> 6.0.4.3594??? >
> > Because in the Adaptive Server Anywhere 9 the comand is
> > : "update scq_chamado_raiox
> > set croqui = xp_read_file( 'c:\teste.jpg' )
> > where num_solicitacao = 4;"
>
>


Reg Domaratzki (iAnywhere Solutions) Posted on 2006-07-10 19:42:19.0Z
From: "Reg Domaratzki \(iAnywhere Solutions\)" <FirstName.LastName@ianywhere.com>
Newsgroups: ianywhere.public.general
References: <44b25e1f$1@forums-2-dub> <44b2aaca.16c2.1681692777@sybase.com>
Subject: Re: Add Image
Lines: 88
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: rdomarat-xp.sybase.com
Message-ID: <44b2ac1b$1@forums-2-dub>
X-Original-Trace: 10 Jul 2006 12:35:55 -0700, rdomarat-xp.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 10 Jul 2006 12:35:56 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 10 Jul 2006 12:42:19 -0700
X-Trace: forums-1-dub 1152560539 10.22.108.75 (10 Jul 2006 12:42:19 -0700)
X-Original-Trace: 10 Jul 2006 12:42:19 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5504
Article PK: 1541

I've never programmed in C#. I'm sure a search for "File" and "Open" will
find a sample.


You'll only be able to use the xp_read_file function when executed from a
database engine of v7 or higher. If it's a v6 engine, it doesn't exist.


--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
iAnywhere Documentation : http://www.ianywhere.com/developer/product_manuals
ASA Patches and EBFs : http://downloads.sybase.com/swd/base.do
-> Choose SQL Anywhere Studio
-> Set filter to "Display ALL platforms IN ALL MONTHS"


<leo@aalborg-industries.com.br> wrote in message
news:44b2aaca.16c2.1681692777@sybase.com...
Ok... Thanks

But I don´t use C. If you have the comand to ASP.NET in
C#, could you send it to me please ???
If I install in the same machine Version 9 and 6, Will this
comand "xp_real_read_file" work ???

> xp_read_file was added in v7. Your options are :
>
> 1) Upgrade to a more recent version of ASA.
> 2) Do it the old fashion way using fopen(), fread(), and
> fclose() and then use the buffer as your parameter.
> Depending on the interface you're using to access the db,
> this, the SQL specific code will be different, but here's
> the basic C Code to read a file into a buffer :
>
> FILE * pFile;
> long lSize;
> char * buffer;
>
> pFile = fopen ( "myfile.txt" , "rb" );
> if (pFile==NULL) exit (1);
>
> // obtain file size.
> fseek (pFile , 0 , SEEK_END);
> lSize = ftell (pFile);
> rewind (pFile);
>
> // allocate memory to contain the whole file.
> buffer = (char*) malloc (lSize);
> if (buffer == NULL) exit (2);
>
> // copy the file into the buffer.
> fread (buffer,1,lSize,pFile);
>
> /*** the whole file is loaded in the buffer. ***/
>
> // terminate
> fclose (pFile);
> free (buffer);
>
> --
> Reg Domaratzki, Sybase iAnywhere Solutions
> Sybase Certified Professional - Sybase ASA Developer
> Version 8 Please reply only to the newsgroup
>
> iAnywhere Developer Community :
> http://www.ianywhere.com/developer iAnywhere Documentation
> : http://www.ianywhere.com/developer/product_manuals ASA
> Patches and EBFs : http://downloads.sybase.com/swd/base.do
> -> Choose SQL Anywhere Studio
> -> Set filter to "Display ALL platforms IN ALL MONTHS"
>
>
> <leo@aalborg-industries.com.br> wrote in message
> news:44b251ab.118c.1681692777@sybase.com...
> > How add image in the Adaptive Server Anywhere
> 6.0.4.3594??? >
> > Because in the Adaptive Server Anywhere 9 the comand is
> > : "update scq_chamado_raiox
> > set croqui = xp_read_file( 'c:\teste.jpg' )
> > where num_solicitacao = 4;"
>
>


leo Posted on 2006-07-11 11:23:59.0Z
Sender: 1189.44b25147.1804289383@sybase.com
From: leo@aalborg-industries.com.br
Newsgroups: ianywhere.public.general
Subject: Re: Add Image
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <44b38a4f.236c.1681692777@sybase.com>
References: <44b2ac1b$1@forums-2-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 11 Jul 2006 04:23:59 -0700
X-Trace: forums-1-dub 1152617039 10.22.241.41 (11 Jul 2006 04:23:59 -0700)
X-Original-Trace: 11 Jul 2006 04:23:59 -0700, 10.22.241.41
Lines: 94
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:5506
Article PK: 1544

Ok Thanks a lot ...
I'll change my database...

> I've never programmed in C#. I'm sure a search for "File"
> and "Open" will find a sample.
>
>
> You'll only be able to use the xp_read_file function when
> executed from a database engine of v7 or higher. If it's
> a v6 engine, it doesn't exist.
>
>
> --
> Reg Domaratzki, Sybase iAnywhere Solutions
> Sybase Certified Professional - Sybase ASA Developer
> Version 8 Please reply only to the newsgroup
>
> iAnywhere Developer Community :
> http://www.ianywhere.com/developer iAnywhere Documentation
> : http://www.ianywhere.com/developer/product_manuals ASA
> Patches and EBFs : http://downloads.sybase.com/swd/base.do
> -> Choose SQL Anywhere Studio
> -> Set filter to "Display ALL platforms IN ALL MONTHS"
>
>
> <leo@aalborg-industries.com.br> wrote in message
> news:44b2aaca.16c2.1681692777@sybase.com...
> Ok... Thanks
>
> But I don´t use C. If you have the comand to ASP.NET in
> C#, could you send it to me please ???
> If I install in the same machine Version 9 and 6, Will
> this comand "xp_real_read_file" work ???
>
> > xp_read_file was added in v7. Your options are :
> >
> > 1) Upgrade to a more recent version of ASA.
> > 2) Do it the old fashion way using fopen(), fread(), and
> > fclose() and then use the buffer as your parameter.
> > Depending on the interface you're using to access the
> > db, this, the SQL specific code will be different, but
> > here's the basic C Code to read a file into a buffer :
> >
> > FILE * pFile;
> > long lSize;
> > char * buffer;
> >
> > pFile = fopen ( "myfile.txt" , "rb" );
> > if (pFile==NULL) exit (1);
> >
> > // obtain file size.
> > fseek (pFile , 0 , SEEK_END);
> > lSize = ftell (pFile);
> > rewind (pFile);
> >
> > // allocate memory to contain the whole file.
> > buffer = (char*) malloc (lSize);
> > if (buffer == NULL) exit (2);
> >
> > // copy the file into the buffer.
> > fread (buffer,1,lSize,pFile);
> >
> > /*** the whole file is loaded in the buffer. ***/
> >
> > // terminate
> > fclose (pFile);
> > free (buffer);
> >
> > --
> > Reg Domaratzki, Sybase iAnywhere Solutions
> > Sybase Certified Professional - Sybase ASA Developer
> > Version 8 Please reply only to the newsgroup
> >
> > iAnywhere Developer Community :
> > http://www.ianywhere.com/developer iAnywhere
> > Documentation :
> > http://www.ianywhere.com/developer/product_manuals ASA
> > Patches and EBFs :
> http://downloads.sybase.com/swd/base.do -> Choose SQL
> > Anywhere Studio -> Set filter to "Display ALL
> platforms IN ALL MONTHS" >
> >
> > <leo@aalborg-industries.com.br> wrote in message
> > news:44b251ab.118c.1681692777@sybase.com...
> > > How add image in the Adaptive Server Anywhere
> > 6.0.4.3594??? >
> > > Because in the Adaptive Server Anywhere 9 the comand
> > > is : "update scq_chamado_raiox
> > > set croqui = xp_read_file( 'c:\teste.jpg' )
> > > where num_solicitacao = 4;"
> >
> >
>
>