|
Home > Archive > SQL Anywhere database > December 2005 > Re: Stored Proc not working
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Stored Proc not working
|
|
| Jayaram Krishnaswamy 2005-12-15, 8:24 pm |
| call dbo.sa_set_http_header( 'Content-Type', 'text/html' )
This procedure produces an error!
any work around for this?
jayaram krishnaswamy
| |
| Greg Fenton 2005-12-15, 8:24 pm |
| Jayaram Krishnaswamy wrote:
> call dbo.sa_set_http_header( 'Content-Type', 'text/html' )
>
> This procedure produces an error!
>
Please always post the version and build number of ASA you are using
(e.g. use the command "dbeng9 -v")
What is the exact error message?
Is there any message in the database server's console?
Are you calling that method directly or from within a web service's handler?
greg.fenton
| |
| Jayaram Krishnaswamy 2005-12-16, 3:23 am |
| Hi Greg:
This is an error from ISQL. Tried to reproduce an example from the BOL.
------------
complete error info:
------------
Procedure '%1' not found
Item Value
SQLCODE -265
Constant SQLE_PROCEDURE_NOT_F
OUND
SQLSTATE 52W09
Sybase error code 504
ODBC 2 State S0002
ODBC 3 State 42S02
Parameter 1 Name of the procedure that could not be found.
Probable cause
You misspelled the name of a procedure, or you did not qualify a procedure
name with a user name.
--------------------------
I am working with Asademo9 server. I wanted to use in a web service but
faced this problem.
The vesion is: 9.0.2.2451
Hope this localizes the problem.
regards,
Jay
"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:43a205b6@forums
-1-dub...
> Jayaram Krishnaswamy wrote:
>
> Please always post the version and build number of ASA you are using
> (e.g. use the command "dbeng9 -v")
>
> What is the exact error message?
> Is there any message in the database server's console?
> Are you calling that method directly or from within a web service's
handler?
>
> greg.fenton
| |
| Chris Keating(iAnywhere Solutions) 2005-12-16, 7:23 am |
| The database file does not appear to have been created in ASA9 or
upgraded to ASA9. This is a system procedure that is created in those
processes.
--
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 Case Express to report bugs http://case-express.sybase.com
********************
********************
********************
*****************
| |
| Jayaram Krishnaswamy 2005-12-16, 9:23 am |
| What I have is the developer's edition and now Is it better to deinstall and
install the latest version? apart from this version details, is there a way
to create the stored procedure since the thing to know is how to set the
variable, what is it called? etc.
If the syntax is known it should be possible in principle.
What is the workaround, as is without upgrading?
This is somewhat urgent for me to know as some one mentioned that a whole
web site has been completed with the web services. At least, I will have to
format out <h2>Hello, world</h2> correctly but not as is in two rows of a
single column table, presently.
Also, probably some browser problem - most of the web services works with
FireFox and some of them do not work with IE (6.0 is what I have). The Type
'XML' works in both browsers.
any thouhgt and help willbe greatly appreciated,
regards,
mysorian
"Chris Keating(iAnywhere Solutions)"
< NoSpamPlease_k_e_a_t
_i_n_g@i_A_n_y_w_h_e
_r_e.com> wrote in message
news:43a2bd81@forums
-2-dub...
> The database file does not appear to have been created in ASA9 or
> upgraded to ASA9. This is a system procedure that is created in those
> processes.
>
> --
>
> 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 Case Express to report bugs http://case-express.sybase.com
>
>
********************
********************
********************
****************
*
| |
| Chris Keating(iAnywhere Solutions) 2005-12-16, 9:23 am |
| Was the database file created with that software? If it was, does the
user have permissions to execute that procedure -- perhaps this is
simply a permissions issue. However, you did indicate success in
creating webservices.
I have tested the hello_world_proc sample from the documentation. it
uses that procedure in the format you indicate and do not experience any
problems.
--
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 Case Express to report bugs http://case-express.sybase.com
********************
********************
********************
*****************
| |
| Jayaram Krishnaswamy 2005-12-16, 9:23 am |
| The database was created with dbinit.exe and it was web enabled by
dbeng9 -xs http(port=8082) mysorian.db
The sybase central was connected to this database.
The said errant stored procedure did not work. There is only one user,
myself, the dba.
The procedure was tested on Interactive SQL that came bundled with the
developer download.
The procedure was also tested with Asademo9 database that came with the
load.
This also did not work.
I am more interested in explaining the basics. What is the syntax for
creating this stored procedure.
There is an example which says one of the parameter is the fieldValue. What
is the correct syntax.
I write tutorials on data related topics from a variety of databases. I
beleive ASA has a big market share due to its synchronization
characteristics. I really want to check it out.
My articles are available at:
http://www.angelfire.com/vt2/hodentek/ArticleLinks.htm
regards,
Jayaram Krishnaswamy
"Chris Keating(iAnywhere Solutions)"
< NoSpamPlease_k_e_a_t
_i_n_g@i_A_n_y_w_h_e
_r_e.com> wrote in message
news:43a2d825$1@foru
ms-1-dub...
> Was the database file created with that software? If it was, does the
> user have permissions to execute that procedure -- perhaps this is
> simply a permissions issue. However, you did indicate success in
> creating webservices.
>
> I have tested the hello_world_proc sample from the documentation. it
> uses that procedure in the format you indicate and do not experience any
> problems.
>
>
> --
>
> 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 Case Express to report bugs http://case-express.sybase.com
>
>
********************
********************
********************
****************
*
| |
| Mark Culp 2005-12-16, 11:23 am |
| A couple of things to note:
- If you dbinit a database using 9.0.x software, the sa_set_http_header()
procedure will be defined, and will be available to all users to call.
- If you call sa_set_http_header()
, or any of the other *http* calls
(sa_set_http_option,
http_variable, http_header), when not running
within a connection that has been established from a web service
connection, the you will get an invalid call error.
So if you try to call sa_set_http_header()
via dbisql[c], you will get
an error.
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
* <<<<< Please always include the ASA version and build number >>>>> *
* <<<<< _and_ the operating system version that you are using >>>>> *
-------------------------------------------------------------------------
Jayaram Krishnaswamy wrote:
>
> The database was created with dbinit.exe and it was web enabled by
> dbeng9 -xs http(port=8082) mysorian.db
>
> The sybase central was connected to this database.
>
> The said errant stored procedure did not work. There is only one user,
> myself, the dba.
>
> The procedure was tested on Interactive SQL that came bundled with the
> developer download.
>
> The procedure was also tested with Asademo9 database that came with the
> load.
> This also did not work.
>
> I am more interested in explaining the basics. What is the syntax for
> creating this stored procedure.
>
> There is an example which says one of the parameter is the fieldValue. What
> is the correct syntax.
>
> I write tutorials on data related topics from a variety of databases. I
> beleive ASA has a big market share due to its synchronization
> characteristics. I really want to check it out.
>
> My articles are available at:
> http://www.angelfire.com/vt2/hodentek/ArticleLinks.htm
>
> regards,
>
> Jayaram Krishnaswamy
> "Chris Keating(iAnywhere Solutions)"
> < NoSpamPlease_k_e_a_t
_i_n_g@i_A_n_y_w_h_e
_r_e.com> wrote in message
> news:43a2d825$1@foru
ms-1-dub...
> ********************
********************
********************
****************
> *
> ********************
********************
********************
****************
> *
> ********************
********************
********************
****************
> *
| |
| Jayaram Krishnaswamy 2005-12-16, 11:23 am |
| Hi Mark:
That's what I did, I did dbinit so that the Server started which can accept
HTTP calls.
But the procedure is not available when I connect to it through Sybase
Central and ran an ISQL utility to test the procedure. Do you think this is
wrong?
I still need an answer as to how may I create this procedure from scratch.
Thanks for any help.
Jayaram Krishnaswamy
There is more to it than meet the eyes.
"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
wrote in message news:43A2E107.D42497CA@iAnywhere.com...[color=darkred]
> A couple of things to note:
>
> - If you dbinit a database using 9.0.x software, the sa_set_http_header()
> procedure will be defined, and will be available to all users to call.
>
> - If you call sa_set_http_header()
, or any of the other *http* calls
> (sa_set_http_option,
http_variable, http_header), when not running
> within a connection that has been established from a web service
> connection, the you will get an invalid call error.
>
> So if you try to call sa_set_http_header()
via dbisql[c], you will get
> an error.
> --
> Mark Culp
> SQLAnywhere Research and Development
> -------------------------------------------------------------------------
> ** Whitepapers, TechDocs, bug fixes are all available through the **
> ** iAnywhere Developer Community at http://www.ianywhere.com/developer **
> -------------------------------------------------------------------------
> * <<<<< Please always include the ASA version and build number >>>>> *
> * <<<<< _and_ the operating system version that you are using >>>>> *
> -------------------------------------------------------------------------
> Jayaram Krishnaswamy wrote:
What[color=darkred]
any[color=darkred]
********************
********************
********************
****************[col
or=darkred]
Edition[color=darkre
d]
to[color=darkred]
********************
********************
********************
****************[col
or=darkred]
********************
********************
********************
****************[col
or=darkred]
| |
| Chris Keating(iAnywhere Solutions) 2005-12-16, 11:23 am |
| I would not recommend that at this stage. I would argue that if you
initialized the database in ASA9 and that procedure is not found/does
not work, I would question whether there had been a problem at the time
the file was created or perhaps subsequently.
Can you rebuild that database? This will ensure that a clean database
file is created.
--
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 Case Express to report bugs http://case-express.sybase.com
********************
********************
********************
*****************
| |
| Jayaram Krishnaswamy 2005-12-16, 11:23 am |
| I think what you are trying to tell me is that this stored procedure will
work ONLY in the context of a web service, not otherwise. Well, it first
failed in my web service, that is the reason I started out trouble shooting
in the ISQL.
"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
wrote in message news:43A2E107.D42497CA@iAnywhere.com...[color=darkred]
> A couple of things to note:
>
> - If you dbinit a database using 9.0.x software, the sa_set_http_header()
> procedure will be defined, and will be available to all users to call.
>
> - If you call sa_set_http_header()
, or any of the other *http* calls
> (sa_set_http_option,
http_variable, http_header), when not running
> within a connection that has been established from a web service
> connection, the you will get an invalid call error.
>
> So if you try to call sa_set_http_header()
via dbisql[c], you will get
> an error.
> --
> Mark Culp
> SQLAnywhere Research and Development
> -------------------------------------------------------------------------
> ** Whitepapers, TechDocs, bug fixes are all available through the **
> ** iAnywhere Developer Community at http://www.ianywhere.com/developer **
> -------------------------------------------------------------------------
> * <<<<< Please always include the ASA version and build number >>>>> *
> * <<<<< _and_ the operating system version that you are using >>>>> *
> -------------------------------------------------------------------------
> Jayaram Krishnaswamy wrote:
What[color=darkred]
any[color=darkred]
********************
********************
********************
****************[col
or=darkred]
Edition[color=darkre
d]
to[color=darkred]
********************
********************
********************
****************[col
or=darkred]
********************
********************
********************
****************[col
or=darkred]
| |
| Greg Fenton 2005-12-16, 11:23 am |
| Jayaram Krishnaswamy wrote:
> Well, it first
> failed in my web service, that is the reason I started out trouble shooting
> in the ISQL.
>
What do you mean by "failed" ?
greg.fenton
| |
| Breck Carter [TeamSybase] 2005-12-16, 1:23 pm |
| AFAIK you can't test web services via dbisql, it doesn't make any
sense... dbisql doesn't do HTTP. Try IE or Firefox.
Breck
On 16 Dec 2005 08:26:31 -0800, "Jayaram Krishnaswamy"
< jkrishnaswamy@comcas
t.net> wrote:
>Hi Mark:
>
>That's what I did, I did dbinit so that the Server started which can accept
>HTTP calls.
>But the procedure is not available when I connect to it through Sybase
>Central and ran an ISQL utility to test the procedure. Do you think this is
>wrong?
>
>I still need an answer as to how may I create this procedure from scratch.
>
>Thanks for any help.
>
>Jayaram Krishnaswamy
>
>There is more to it than meet the eyes.
>
>"Mark Culp" < reply_to_newsgroups_
only_please_nospam_m
ark.culp@iAnywhere.com>
>wrote in message news:43A2E107.D42497CA@iAnywhere.com...
>What
>any
> ********************
********************
********************
****************
>Edition
>to
> ********************
********************
********************
****************
> ********************
********************
********************
****************
>
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| Jayaram Krishnaswamy 2005-12-16, 8:23 pm |
| Breck and Mark's comments makes complete sense to me.
Yes, it is true that this stored procedure should be run in the context of a
web service where it is meaningfull, it has no meaning stand alone in
ISQL. In fact the error message was good, it said context-type has no
meaning.
I thank you all, Greg, Chris, Mark, and Breck.
Jayaram Krishnaswamy
"Greg Fenton" <greg. fenton_NOSPAM_@ianyw
here.com> wrote in message
news:43a2f5ca$1@foru
ms-1-dub...
> Jayaram Krishnaswamy wrote:
shooting[color=darkr
ed]
>
> What do you mean by "failed" ?
>
> greg.fenton
|
|
|
|
|