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.

DBO.xp_read_file problem

6 posts in General Discussion Last posting was on 2004-07-21 13:51:02.0Z
vish Posted on 2004-07-19 13:34:17.0Z
Reply-To: "vish" <vish2cu@hotmail.com>
From: "vish" <vish2cu@hotmail.com>
Newsgroups: ianywhere.public.general
Subject: DBO.xp_read_file problem
Lines: 10
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 203.197.53.18
X-Original-NNTP-Posting-Host: 203.197.53.18
Message-ID: <40fbcdd9@forums-1-dub>
Date: 19 Jul 2004 06:34:17 -0700
X-Trace: forums-1-dub 1090244057 203.197.53.18 (19 Jul 2004 06:34:17 -0700)
X-Original-Trace: 19 Jul 2004 06:34:17 -0700, 203.197.53.18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3272
Article PK: 6726

Hi,

I am getting error "Calling functions outside the database server is not
supported"
When accessing xp_read_file from select statement
SELECT DBO.xp_read_file('xx.bmp');

Thanks


Greg Fenton Posted on 2004-07-19 15:39:30.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla Thunderbird 1.6.3.2f (Windows/20040707)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: DBO.xp_read_file problem
References: <40fbcdd9@forums-1-dub>
In-Reply-To: <40fbcdd9@forums-1-dub>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: gfenton-xp.sybase.com
Message-ID: <40fbec19$1@forums-2-dub>
X-Original-Trace: 19 Jul 2004 08:43:21 -0700, gfenton-xp.sybase.com
Lines: 22
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 19 Jul 2004 08:33:00 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 19 Jul 2004 08:39:30 -0700
X-Trace: forums-1-dub 1090251570 10.22.108.75 (19 Jul 2004 08:39:30 -0700)
X-Original-Trace: 19 Jul 2004 08:39:30 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3273
Article PK: 6727


vish wrote:
>
> I am getting error "Calling functions outside the database server is not
> supported"
> When accessing xp_read_file from select statement
> SELECT DBO.xp_read_file('xx.bmp');
>

Please *always* post the version and build number of ASA that you are
using (e.g. use the command "dbeng9 -v" for ASA 9.x)

What OS and version are you running on?
How are you connected to the database?

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/


Chris Keating (iAnywhere Solutions) Posted on 2004-07-19 17:13:48.0Z
From: "Chris Keating \(iAnywhere Solutions\)" <FightSpam_keating@iAnywhere.com>
Newsgroups: ianywhere.public.general
References: <40fbcdd9@forums-1-dub> <40fbec19$1@forums-2-dub>
Subject: Re: DBO.xp_read_file problem
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Original-NNTP-Posting-Host: cpe0080c6f83676-cm012059936305.cpe.net.cable.rogers.com
Message-ID: <40fc0235$1@forums-2-dub>
X-Original-Trace: 19 Jul 2004 10:17:41 -0700, cpe0080c6f83676-cm012059936305.cpe.net.cable.rogers.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 19 Jul 2004 10:07:19 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 19 Jul 2004 10:13:48 -0700
X-Trace: forums-1-dub 1090257228 10.22.108.75 (19 Jul 2004 10:13:48 -0700)
X-Original-Trace: 19 Jul 2004 10:13:48 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3274
Article PK: 6728

Can your engine find the file "dbextf.dll "?

--

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

****************************************************************************
*
Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
and try out the market-leading database for mobile, embedded and small to
medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

****************************************************************************
*

iAnywhere Solutions http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use CaseXpress to report bugs http://casexpress.sybase.com

****************************************************************************
*

"Greg Fenton" <greg.fenton_NOSPAM_@ianywhere.com> wrote in message
news:40fbec19$1@forums-2-dub...
> vish wrote:
> >
> > I am getting error "Calling functions outside the database server is not
> > supported"
> > When accessing xp_read_file from select statement
> > SELECT DBO.xp_read_file('xx.bmp');
> >
>
> Please *always* post the version and build number of ASA that you are
> using (e.g. use the command "dbeng9 -v" for ASA 9.x)
>
> What OS and version are you running on?
> How are you connected to the database?
>
> greg.fenton
> --
> Greg Fenton
> Consultant, Solution Services, iAnywhere Solutions
> --------
> Visit the iAnywhere Solutions Developer Community
> Whitepapers, TechDocs, Downloads
> http://www.ianywhere.com/developer/


vish Posted on 2004-07-21 13:18:07.0Z
Reply-To: "vish" <vish2cu@hotmail.com>
From: "vish" <vish2cu@hotmail.com>
Newsgroups: ianywhere.public.general
References: <40fbcdd9@forums-1-dub> <40fbec19$1@forums-2-dub> <40fc0235$1@forums-2-dub>
Subject: Re: DBO.xp_read_file problem
Lines: 71
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 203.197.53.18
X-Original-NNTP-Posting-Host: 203.197.53.18
Message-ID: <40fe6d0f$1@forums-1-dub>
Date: 21 Jul 2004 06:18:07 -0700
X-Trace: forums-1-dub 1090415887 203.197.53.18 (21 Jul 2004 06:18:07 -0700)
X-Original-Trace: 21 Jul 2004 06:18:07 -0700, 203.197.53.18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3282
Article PK: 6738

using ASA9 developer edition ver -9.0.1(1751)
INSERT INTO DBA.Images (Image,ImageHeight,ImageWidth) values ((SELECT
DBO.xp_read_file('"+ imgStorePath +"')),100,200)
where imgStorePath = "\\xx\\xx.bmp"

dbextf.dll is found in D:\rogram files\Sybase\SQL AnyWhere 9\win32

Thanks
"Chris Keating (iAnywhere Solutions)" <FightSpam_keating@iAnywhere.com>

wrote in message news:40fc0235$1@forums-2-dub...
> Can your engine find the file "dbextf.dll "?
>
> --
>
> Chris Keating
> Sybase Adaptive Server Anywhere Professional Version 8
>
>
****************************************************************************
> *
> Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
> and try out the market-leading database for mobile, embedded and small to
> medium sized business environments for free!
>
> http://www.ianywhere.com/promos/deved/index.html
>
>
****************************************************************************
> *
>
> iAnywhere Solutions http://www.iAnywhere.com
>
> ** Please only post to the newsgroup
>
> ** Whitepapers can be found at http://www.iAnywhere.com/developer
> ** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
> ** Use CaseXpress to report bugs http://casexpress.sybase.com
>
>
****************************************************************************
> *
>
> "Greg Fenton" <greg.fenton_NOSPAM_@ianywhere.com> wrote in message
> news:40fbec19$1@forums-2-dub...
> > vish wrote:
> > >
> > > I am getting error "Calling functions outside the database server is
not
> > > supported"
> > > When accessing xp_read_file from select statement
> > > SELECT DBO.xp_read_file('xx.bmp');
> > >
> >
> > Please *always* post the version and build number of ASA that you are
> > using (e.g. use the command "dbeng9 -v" for ASA 9.x)
> >
> > What OS and version are you running on?
> > How are you connected to the database?
> >
> > greg.fenton
> > --
> > Greg Fenton
> > Consultant, Solution Services, iAnywhere Solutions
> > --------
> > Visit the iAnywhere Solutions Developer Community
> > Whitepapers, TechDocs, Downloads
> > http://www.ianywhere.com/developer/
>
>


Breck Carter [TeamSybase] Posted on 2004-07-21 13:47:15.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: DBO.xp_read_file problem
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <2dssf051slgvv54clsgo60rnimslvsdr83@4ax.com>
References: <40fbcdd9@forums-1-dub> <40fbec19$1@forums-2-dub> <40fc0235$1@forums-2-dub> <40fe6d0f$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 12.24.172.2
X-Original-Trace: 21 Jul 2004 06:51:15 -0700, 12.24.172.2
Lines: 94
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 21 Jul 2004 06:40:35 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 21 Jul 2004 06:47:15 -0700
X-Trace: forums-1-dub 1090417635 10.22.108.75 (21 Jul 2004 06:47:15 -0700)
X-Original-Trace: 21 Jul 2004 06:47:15 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3283
Article PK: 6736

Try this:

INSERT INTO DBA.Images (Image,ImageHeight,ImageWidth) values ((SELECT
DBO.xp_read_file('"'+ imgStorePath +'"')),100,200)
where imgStorePath = '\\xx\\xx.bmp'

or this...

INSERT INTO DBA.Images (Image,ImageHeight,ImageWidth) values ((SELECT
DBO.xp_read_file(imgStorePath)),100,200)
where imgStorePath = '\\xx\\xx.bmp'

Breck

On 21 Jul 2004 06:18:07 -0700, "vish" <vish2cu@hotmail.com> wrote:

>using ASA9 developer edition ver -9.0.1(1751)
>INSERT INTO DBA.Images (Image,ImageHeight,ImageWidth) values ((SELECT
>DBO.xp_read_file('"+ imgStorePath +"')),100,200)
>where imgStorePath = "\\xx\\xx.bmp"
>
>dbextf.dll is found in D:\rogram files\Sybase\SQL AnyWhere 9\win32
>
>Thanks
>"Chris Keating (iAnywhere Solutions)" <FightSpam_keating@iAnywhere.com>
>wrote in message news:40fc0235$1@forums-2-dub...
>> Can your engine find the file "dbextf.dll "?
>>
>> --
>>
>> Chris Keating
>> Sybase Adaptive Server Anywhere Professional Version 8
>>
>>
>****************************************************************************
>> *
>> Sign up today for your copy of the SQL Anywhere Studio 9 Developer Edition
>> and try out the market-leading database for mobile, embedded and small to
>> medium sized business environments for free!
>>
>> http://www.ianywhere.com/promos/deved/index.html
>>
>>
>****************************************************************************
>> *
>>
>> iAnywhere Solutions http://www.iAnywhere.com
>>
>> ** Please only post to the newsgroup
>>
>> ** Whitepapers can be found at http://www.iAnywhere.com/developer
>> ** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
>> ** Use CaseXpress to report bugs http://casexpress.sybase.com
>>
>>
>****************************************************************************
>> *
>>
>> "Greg Fenton" <greg.fenton_NOSPAM_@ianywhere.com> wrote in message
>> news:40fbec19$1@forums-2-dub...
>> > vish wrote:
>> > >
>> > > I am getting error "Calling functions outside the database server is
>not
>> > > supported"
>> > > When accessing xp_read_file from select statement
>> > > SELECT DBO.xp_read_file('xx.bmp');
>> > >
>> >
>> > Please *always* post the version and build number of ASA that you are
>> > using (e.g. use the command "dbeng9 -v" for ASA 9.x)
>> >
>> > What OS and version are you running on?
>> > How are you connected to the database?
>> >
>> > greg.fenton
>> > --
>> > Greg Fenton
>> > Consultant, Solution Services, iAnywhere Solutions
>> > --------
>> > Visit the iAnywhere Solutions Developer Community
>> > Whitepapers, TechDocs, Downloads
>> > http://www.ianywhere.com/developer/
>>
>>
>

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com


Greg Fenton Posted on 2004-07-21 13:51:02.0Z
From: Greg Fenton <greg.fenton_NOSPAM_@ianywhere.com>
Organization: iAnywhere Solutions Inc.
User-Agent: Mozilla Thunderbird 1.6.3.2f (Windows/20040707)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: DBO.xp_read_file problem
References: <40fbcdd9@forums-1-dub> <40fbec19$1@forums-2-dub> <40fc0235$1@forums-2-dub> <40fe6d0f$1@forums-1-dub>
In-Reply-To: <40fe6d0f$1@forums-1-dub>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: gfenton-xp.sybase.com
X-Original-NNTP-Posting-Host: gfenton-xp.sybase.com
Message-ID: <40fe74c6$1@forums-1-dub>
Date: 21 Jul 2004 06:51:02 -0700
X-Trace: forums-1-dub 1090417862 10.25.100.188 (21 Jul 2004 06:51:02 -0700)
X-Original-Trace: 21 Jul 2004 06:51:02 -0700, gfenton-xp.sybase.com
Lines: 26
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3284
Article PK: 7195


vish wrote:
> INSERT INTO DBA.Images (Image,ImageHeight,ImageWidth) values ((SELECT
> DBO.xp_read_file('"+ imgStorePath +"')),100,200)
> where imgStorePath = "\\xx\\xx.bmp"
>

This is incomplete code as the single- and double-quotes in the above
aren't paired up.

Are you using EXECUTE IMMEDIATE or something else?
Can you post the *exact* code that is being used?

Can you simply execute the following in ISQL:
SELECT xp_read_file( '/xx/xx.bmp' )

(BTW: I always use '/' in filepath arguments as '\' is the escape
character so it causes all sorts of coding headaches)

greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/