Number parameters in Oracle Stored Procedures

This is an FYI.

I am running Mobilink Server 10.0.0.2465 as a service under Windows XP SP2. 
I am using an Oracle 10G consolidated database with the Oracle ODBC drivers 
provided by Mobilink.

When calling an Oracle Stored Procedure from a Mobilink event, if an arg is 
set to type NUMBER(15,5) and you pass in a decimal number, 10.56 for 
example, the ODBC driver appears to be rounding the number to 11.

Now, if I change the arg to using the tablename.columname%TYPE syntax in the 
Oracle stored procedure, then the number is not being rounded.

I know this was not an issue in Mobilink 9 with its Oracle Wire ODBC, since 
the code originated in ML 9.

Hope this helps someone

Paul Watje



0
Paul
12/5/2006 7:45:55 PM
sybase.sqlanywhere.mobilink 5254 articles. 0 followers. Follow

4 Replies
474 Views

Similar Articles

[PageSpeed] 42

"Paul Watje" <paulwatje@hotmail.com> wrote in news:4575da83@forums-1-dub
of sybase.public.sqlanywhere.mobilink: 

PW> This is an FYI.
PW> 
PW> I am running Mobilink Server 10.0.0.2465 as a service under Windows 
XP
PW> SP2. I am using an Oracle 10G consolidated database with the Oracle
PW> ODBC drivers provided by Mobilink.
PW> 
PW> When calling an Oracle Stored Procedure from a Mobilink event, if an
PW> arg is set to type NUMBER(15,5) and you pass in a decimal number,
PW> 10.56 for example, the ODBC driver appears to be rounding the number
PW> to 11. 
PW> 
PW> Now, if I change the arg to using the tablename.columname%TYPE syntax
PW> in the Oracle stored procedure, then the number is not being rounded.
PW> 
PW> I know this was not an issue in Mobilink 9 with its Oracle Wire ODBC,
PW> since the code originated in ML 9.

I think it would useful in this case to post an ODBC trace.
If you start ML using -tt odbc.txt it will produce the trace.
If you can show 1 trace with the problem and 1 trace without trying to
keep the same number of updates each time.
-- 
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase 
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with 
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList

0
David
12/7/2006 12:53:18 PM
I had no trouble with the following :

CREATE TABLE Admin (
  admin_id      number(20,5) not null primary key,
  data          varchar2(30),
  last_modified date default (sysdate)
)
/
call ml_add_column( 'v1', 'Admin', 'admin_id', NULL )
/
call ml_add_column( 'v1', 'Admin', 'data', NULL )
/

CREATE OR REPLACE PROCEDURE AdminUploadInsert (
  v_admin_id IN NUMBER ,
  v_data IN VARCHAR2 )
AS
BEGIN
  INSERT INTO Admin VALUES ( v_admin_id, v_data, DEFAULT );
END;
/

call ml_add_table_script( 'v1', 'Admin', 'upload_insert', '{call 
AdminUploadInsert( {ml r.admin_id}, {ml r.data} )}' )
/


When I inserted the values ( 30.3, 'rem1' ) in the remote database and 
synchronized, the value 30.3 was inserted in the consolidated.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> select * from Admin
  2  ;

  ADMIN_ID DATA                           LAST_MODI
---------- ------------------------------ ---------
      30.3 rem1                           07-DEC-06

1 rows selected.

Can you show us the schema of the table, the stored procedure you created, 
and the table script you defined ?

-- 
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"


"Paul Watje" <paulwatje@hotmail.com> wrote in message 
news:4575da83@forums-1-dub...
> This is an FYI.
>
> I am running Mobilink Server 10.0.0.2465 as a service under Windows XP 
> SP2. I am using an Oracle 10G consolidated database with the Oracle ODBC 
> drivers provided by Mobilink.
>
> When calling an Oracle Stored Procedure from a Mobilink event, if an arg 
> is set to type NUMBER(15,5) and you pass in a decimal number, 10.56 for 
> example, the ODBC driver appears to be rounding the number to 11.
>
> Now, if I change the arg to using the tablename.columname%TYPE syntax in 
> the Oracle stored procedure, then the number is not being rounded.
>
> I know this was not an issue in Mobilink 9 with its Oracle Wire ODBC, 
> since the code originated in ML 9.
>
> Hope this helps someone
>
> Paul Watje
>
>
> 


0
Reg
12/7/2006 2:15:53 PM
I should have also said that I'm using the same version of the ODBC driver, 
although I'm using the latest v10.0.0 EBF ( which I can't imagine is the 
source of your problem ).

I. 2006-12-07 10:00:30. SQL Anywhere MobiLink Server Version 10.0.0.2745
I. 2006-12-07 10:00:30. <Main> ODBC DBMS Name: Oracle
I. 2006-12-07 10:00:30. <Main> ODBC DBMS Version: 10.02.0000 Oracle 
10.2.0.1.0
I. 2006-12-07 10:00:30. <Main> ODBC DBMS Driver Version: 05.10.0143 (B0099, 
U0055)

-- 
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"


"Reg Domaratzki (iAnywhere Solutions)" <FirstName.LastName@ianywhere.com> 
wrote in message news:45783029@forums-1-dub...
>I had no trouble with the following :
>
> CREATE TABLE Admin (
>  admin_id      number(20,5) not null primary key,
>  data          varchar2(30),
>  last_modified date default (sysdate)
> )
> /
> call ml_add_column( 'v1', 'Admin', 'admin_id', NULL )
> /
> call ml_add_column( 'v1', 'Admin', 'data', NULL )
> /
>
> CREATE OR REPLACE PROCEDURE AdminUploadInsert (
>  v_admin_id IN NUMBER ,
>  v_data IN VARCHAR2 )
> AS
> BEGIN
>  INSERT INTO Admin VALUES ( v_admin_id, v_data, DEFAULT );
> END;
> /
>
> call ml_add_table_script( 'v1', 'Admin', 'upload_insert', '{call 
> AdminUploadInsert( {ml r.admin_id}, {ml r.data} )}' )
> /
>
>
> When I inserted the values ( 30.3, 'rem1' ) in the remote database and 
> synchronized, the value 30.3 was inserted in the consolidated.
>
> Connected to:
> Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
> With the Partitioning, OLAP and Data Mining options
>
> SQL> select * from Admin
>  2  ;
>
>  ADMIN_ID DATA                           LAST_MODI
> ---------- ------------------------------ ---------
>      30.3 rem1                           07-DEC-06
>
> 1 rows selected.
>
> Can you show us the schema of the table, the stored procedure you created, 
> and the table script you defined ?
>
> -- 
> 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"
>
>
> "Paul Watje" <paulwatje@hotmail.com> wrote in message 
> news:4575da83@forums-1-dub...
>> This is an FYI.
>>
>> I am running Mobilink Server 10.0.0.2465 as a service under Windows XP 
>> SP2. I am using an Oracle 10G consolidated database with the Oracle ODBC 
>> drivers provided by Mobilink.
>>
>> When calling an Oracle Stored Procedure from a Mobilink event, if an arg 
>> is set to type NUMBER(15,5) and you pass in a decimal number, 10.56 for 
>> example, the ODBC driver appears to be rounding the number to 11.
>>
>> Now, if I change the arg to using the tablename.columname%TYPE syntax in 
>> the Oracle stored procedure, then the number is not being rounded.
>>
>> I know this was not an issue in Mobilink 9 with its Oracle Wire ODBC, 
>> since the code originated in ML 9.
>>
>> Hope this helps someone
>>
>> Paul Watje
>>
>>
>>
>
> 


0
Reg
12/7/2006 2:21:34 PM
Sybase guys

I will try and do the trace a later in the month after my delivery is done.

Thanks


"David Fishburn" <fishburn_spam@off.ianywhere.com> wrote in message 
news:Xns989258D952A1fishburnsybasecom@127.0.0.1...
> "Paul Watje" <paulwatje@hotmail.com> wrote in news:4575da83@forums-1-dub
> of sybase.public.sqlanywhere.mobilink:
>
> PW> This is an FYI.
> PW>
> PW> I am running Mobilink Server 10.0.0.2465 as a service under Windows
> XP
> PW> SP2. I am using an Oracle 10G consolidated database with the Oracle
> PW> ODBC drivers provided by Mobilink.
> PW>
> PW> When calling an Oracle Stored Procedure from a Mobilink event, if an
> PW> arg is set to type NUMBER(15,5) and you pass in a decimal number,
> PW> 10.56 for example, the ODBC driver appears to be rounding the number
> PW> to 11.
> PW>
> PW> Now, if I change the arg to using the tablename.columname%TYPE syntax
> PW> in the Oracle stored procedure, then the number is not being rounded.
> PW>
> PW> I know this was not an issue in Mobilink 9 with its Oracle Wire ODBC,
> PW> since the code originated in ML 9.
>
> I think it would useful in this case to post an ODBC trace.
> If you start ML using -tt odbc.txt it will produce the trace.
> If you can show 1 trace with the problem and 1 trace without trying to
> keep the same number of updates each time.
> -- 
> David Fishburn
> Certified ASA Developer Version 8
> iAnywhere Solutions - Sybase
> Professional Services
> Please only post to the newsgroup
> Please ALWAYS include version and MORE importantly BUILD number with
> EACH post (dbeng9 -v).
>
> EBFs and Maintenance Releases
> http://downloads.sybase.com/
>
> Developer Community / Whitepapers
> http://www.ianywhere.com/developer
>
> CaseXpress - to report bugs
> http://casexpress.sybase.com
>
> CodeXchange - Free samples
> http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList
> 


0
Paul
12/13/2006 2:49:07 PM
Reply:

Similar Artilces:

Parameters of an Oracle stored procedure
I'm using PowerBuilder 9.0 with Oracle Net8. Is it possible to make parameters of an Oracle stored procedure into bind variables? Thanks. ...

How to convert Sql Server Stored Procedures into Oracle Stored Procedures
Hi All, I am migrating from sql server2000 to oracle. I have moved all table into oracle manually. Now I need to move stored procedure. I don't know how to convert sql server stored procedure into oracle stored procedure form. Is there any tool which will convert directly. Please some one help me. Thank you.    Hi there,Please use the tool bellow, which does the job you want. http://www.swissql.com/products/sqlserver-to-oracle/sql-server-to-oracle.html thanks sharp guy...

Oracle stored procedure with BLOB parameter
I have two simple Oracle7 stored procedures that will store LONG RAW data into and retrieve from an Oracle table. They are declared as transaction object's local external function - something like put_raw( long id, BLOB b, REF int returncode) and get_raw(long id, REF BLOB b, REF int returncode) The problem I am having is that put_raw() works just fine. Get_raw() seems to work, and to verify , I write the BLOB variable into a file. It is supposed to be a JPG file, but the written file is not a JPG. Secondly, before invoking get_raw(), I must do: b = BLOB(space(32000)) ...

Binding parameters of an Oracle stored procedure
I'm using PowerBuilder 9.0 and Oracle Net8. When a DBParm parameter DisableBind is set to 0(default), PowerBuilder binds input parameters to a compiled SQL statement. I wonder if this applies to parameters of an Oracle stored procedure. Thanks. Since you don't put a : on the arguments to an RPCFUNC, I don't think so. <Nobuo Saito> wrote in message news:429eb1fe.38ca.1681692777@sybase.com... > I'm using PowerBuilder 9.0 and Oracle Net8. > When a DBParm parameter DisableBind is set to 0(default), > PowerBuilder binds input parameters to a compiled SQL...

Oracle Output Parameters from Stored Procedure
Powerbuilder 8.0 Executable compiled in Windows 2000 is causing GPF while executing on Windows NT workstation. This problem is occurring frequently while accessing the application from windows NT workstation and same one is working perfectly in windows 2000 workstation. After investigating the GPF we found out that this problem is occuring while executing the stored procedure with more than 20 parameters from powerbuilder executable on windows NT workstation. The same part of the code is executing successfully on windows 2000 workstation. we are suspecting that the problem is occuring...

Variable number of parameters into stored procedure
I apologize up front for the length of this message. I am trying to pass a variable number of parameters into a MS SQL 2008 stored procedure using Delphi 2009. The procedure (and stored procedure) are: procedure AddTagToPartID(PartID : Integer; Tag, TagDescription : String; CreateNew : Boolean; TagCodeGUID : TGUID; NewTagCode : String; AssignRelated : Boolean; RelatedTagGUID : TGUID); var RS : TADOStoredProc; begin RS := TADOStoredProc.Create(nil); try RS.Connection ...

Array parameter to oracle stored procedure
Dear friends,  I want to pass array parameter to following oracle  stored procedure from visual studio 2005 using vb.net my is question is it possible or not   create or replace package demo_pkg    as        type charArray is table of varchar2(255) index by binary_integer;       procedure emp_report( pin  in charArray,                           &nb...

Mobilink Parameters not passed to some stored procedures
We are working in a MS SQL Server 200 - Adaptive Server Anywhere MobiLink Version 8.0.0.2289 environment. When I define a download_cursor script which calls a stored procedure, and want to pass along the ml_user parameter, Mobilink does not pass this parameter. (I use the -zd command-line option to pass the last download timestamp last) (This was already an issue in version 7.0.x. We then used a workaround which greatly complicated our synchronization scripts) Geert Klinckaert MOBILINK LOG EXTRACT ===================== E. 06/25 16:44:00. <1.5> [B1]: Error: ODBC: [Mic...

Oracle: No stored procedure parameters during design.
I have a simple test stored procedure. I setup a TAdoStoredProcedure and a TAdoDataSet to call the procedure. I set the name (The name is present in the drop down.), but no parameters show up after setting the name procedure's name. What is missing here? Here is the procedure's code. create or replace PROCEDURE ns_foo( aInt1 in INTEGER, aInt2 in INTEGER, aResult out INTEGER) IS BEGIN aResult := aInt1 + aInt2; END ns_foo; My database is a local database with Oracle 10g Express. I think I might have found the problem. I created a new user and created the objects in the ...

How to use Oracle Store Procedure with out parameters?
experts, Could you give me a hand to let me go out of my problem? I create a package acc.MS_Load.remove_(info_ out varchar2, contract_ in varchar2), then I using the following script to use it as that: string info_, contract_ info_ = space(2000) contract = 'NN' DECLARE myproc procedure for acc.MS_load.remove_(:info_,:contract_); Execute myproc; if sqlca.sqlcode .... When it runs, it said that "PLS-00306:wrong numnber or types of arguments in call to 'acc.ms_load.remove_'" Why? Thank you and best regards! Venn Try using INOUT instead...

SQLAnywhere stored procedure output parameters?
Hello. Is there any way to get the value of output parameters for stored procedures in SQL Anywhere in PowerBuilder? I know the output parameters are supported by the DBMS, because I can get their values in Delphi. Thanks in advance. Francisco Leong Hi, Thanks. I wish I could do something like DECLARE PROCEDURE... with the OUT specifier. Also I need to call stored procedures with output parameters in a dynamic way. I don't know exactly the name of the stored procedure until run-time, but I know about the number of arguments and their types. Is it possible? (Not only for...

Stored Procedure
Hi, I have a repeater control which I populate with search results from SQL Server. But I can't figure out how to cope with users who submit multiple search items and still use my stored procedure. Is this possible or do you have to build the query with a StringBuilder and execute it manually? I'm using a stored procedure with parameters: input parameters <-- PageSize & CurrentPage output parameter --> TotalRecords Am using a temporary table to store all records before Select-ing those required for the particular page. If I compose the query manually then I ...

Call Oracle Store Procedure with cursor parameter
Dear All, I have a problem when call the Oracle Store Procedure from Powerbuilder. The Store Procedure should pass a cursor parameter. How can I pass the cursor from Powerbuilder. The working environment is PB7 and Oracle 8i Thanks a lot TONY ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp you will have to create a package like this: package pkg_rpt_set is type my_result_set is REF CURSOR ; end pkg_rpt_set ; Then your procedure should be like : PROCEDURE p_test (p_user_id varchar2, out_result ...

Stored Procedure (without parameters) vs. Oracle
Hi there, in our company we are using many (small) PowerBuilder applications. Currently we are migrating some of these to PowerBuilder 10.2. The migration itself (in terms of getting the applications compile with PB 10.2) seems to be pretty easy. But there is a problem with one particular PB 6.5 app. This program calls a stored procedure in our Oracle 8.1.7.4 database. The stored procedure is pretty simple and takes no parameters. When using PB 6.5 with the native O73 driver it works, but if I try to run the application with PB 10.2 and the native O84 driver, the app (and the...

Web resources about - Number parameters in Oracle Stored Procedures - sybase.sqlanywhere.mobilink

Parameter - Wikipedia, the free encyclopedia
A parameter (from the Ancient Greek παρά , "para", meaning "beside, subsidiary" and μέτρον , "metron", meaning "measure"), in its common meaning, ...

fb_source Parameter - Facebook-Entwickler
This document lists the complete list of values for the fb_source parameter that is returned with th...

Google / Firefox Parameter - Flickr - Photo Sharing!
HS what? www.seroundtable.com/archives/017105.html

Cat 8: TIA performance standards committee chairman previews parameters of forthcoming twisted-pair cable ...
Category 8, the next-generation twisted-pair cabling specification, is still in development, but the outlook looks quite positive that it will ...

Philippine president asks for 'parameters' of Mayon Volcano tours
Philippine president asks for 'parameters' of Mayon Volcano tours People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, Apr, May, ...

Alternatives to boolean parameters
... ) { PrintLine ( item . Name ); if ( printDetails ) { PrintLine ( item . Description ); } } } Aha! Now can see that the boolean parameter ...

Exporting Error (Error in Parameter...: Apple Support Communities
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability ...

Apple tech monitors device aging, adjusts operating parameters to ensure optimal performance
... describing a method of monitoring the aging of a device's electronics, comparing the data with a global average and modifying operating parameters ...

Is it poor programming practice to pass parameters as objects?
... a free, community-powered network of 100+ Q&A sites . Risser asked: So, we've got a guy who likes to write methods that take Objects as parameters, ...

Parameter Short Film Competition sponsored by Grolsch
Grolsch presents Parameter The A.V. Club Short Film Competition Please Enter Your Date of Birth Ineligible entry Enter For people over the age ...

Resources last updated: 12/31/2015 7:39:59 PM