UDF on transaction object

I have a user defined function that returns an integer value. I would like 
to hang it off my transaction object in PB and create a local function to 
call in my scripts. I do this all the time for stored procs but I'm not 
having any success with this function. Have I got something declared 
incorrectly or is it not doable in my environment?

I had to enter the declaration manually because the UDFs don't show up in 
the "paste special" list.
Here is the declaration...
function long uf_is_audit_readonly(long ai_audit_id) RPCFUNC ALIAS FOR 
"dbo.uf_is_audit_readonly"

Here is the error message when it tries to execute...
The request for procedure 'dbo.uf_is_audit_readonly' failed because 
'dbo.uf_is_audit_readonly' is a SQL function object.

ASE 15.0.3
PB 12 build 5530

I am using the ASE 12.5 client not the ASE 15 client. I am able to execute 
the udf successfully from my machine in the PB database painter and SQL 
Advantage so I don't think running the ASE 12.5 client is an issue.

Thanks,
Mark 


0
Mark
7/19/2010 6:50:17 PM
sybase.powerbuilder.database 9855 articles. 2 followers. Follow

2 Replies
1084 Views

Similar Articles

[PageSpeed] 2

"Mark" <mlibner@yahoo.com> wrote in message news:4c449e69$1@forums-1-dub...
>I have a user defined function that returns an integer value. I would like 
>to hang it off my transaction object in PB and create a local function to 
>call in my scripts. I do this all the time for stored procs but I'm not 
>having any success with this function. Have I got something declared 
>incorrectly or is it not doable in my environment?
>
> I had to enter the declaration manually because the UDFs don't show up in 
> the "paste special" list.
> Here is the declaration...
> function long uf_is_audit_readonly(long ai_audit_id) RPCFUNC ALIAS FOR 
> "dbo.uf_is_audit_readonly"
>
> Here is the error message when it tries to execute...
> The request for procedure 'dbo.uf_is_audit_readonly' failed because 
> 'dbo.uf_is_audit_readonly' is a SQL function object.
>
> ASE 15.0.3
> PB 12 build 5530
>
> I am using the ASE 12.5 client not the ASE 15 client. I am able to execute 
> the udf successfully from my machine in the PB database painter and SQL 
> Advantage so I don't think running the ASE 12.5 client is an issue.

The RPC interface is for procedures (that do not generate resultsets) only, 
due to the syntax used.  You EXEC a procedure, but you (generally) SELECT 
from a UDF. 


0
Scott
7/19/2010 8:45:37 PM
Hi Scott,

I use the RPC interface for UDFs in SQL Anywhere all the time. I was hoping 
I could do the same with ASE.

I ended up creating a stored proc with an output parameter to return my 
value.

Thanks,
Mark

"Scott Morris" <bogus@bogus.com> wrote in message 
news:4c44b971$1@forums-1-dub...
>
> "Mark" <mlibner@yahoo.com> wrote in message 
> news:4c449e69$1@forums-1-dub...
>>I have a user defined function that returns an integer value. I would like 
>>to hang it off my transaction object in PB and create a local function to 
>>call in my scripts. I do this all the time for stored procs but I'm not 
>>having any success with this function. Have I got something declared 
>>incorrectly or is it not doable in my environment?
>>
>> I had to enter the declaration manually because the UDFs don't show up in 
>> the "paste special" list.
>> Here is the declaration...
>> function long uf_is_audit_readonly(long ai_audit_id) RPCFUNC ALIAS FOR 
>> "dbo.uf_is_audit_readonly"
>>
>> Here is the error message when it tries to execute...
>> The request for procedure 'dbo.uf_is_audit_readonly' failed because 
>> 'dbo.uf_is_audit_readonly' is a SQL function object.
>>
>> ASE 15.0.3
>> PB 12 build 5530
>>
>> I am using the ASE 12.5 client not the ASE 15 client. I am able to 
>> execute the udf successfully from my machine in the PB database painter 
>> and SQL Advantage so I don't think running the ASE 12.5 client is an 
>> issue.
>
> The RPC interface is for procedures (that do not generate resultsets) 
> only, due to the syntax used.  You EXEC a procedure, but you (generally) 
> SELECT from a UDF.
>Thanks, 


0
Mark
7/19/2010 9:00:36 PM
Reply:

Similar Artilces:

Same database but multiple transaction objects
Could someone tell me some way through which I can use the same database for 2 transactions ? ( in PB 6.5 ) Following is the situation : 1. SQLCA_Another. ( This is another transaction object ) 2. SQLCA. ( Default Transaction object) 3. I am using an INI file, say app.ini. ( This has got the entries for database / login / password etc. and I am reading the data from this INI file.) 4. How should I know that I am using another database ? ( Like say, I am checking the value of SQLCA_Another.SQLCode ) SQLCA_Another = CREATE n_tr SQLCA_Another.DBMS ...

Finding if a transaction object is connected to the database??
Hi, I am working with an application that uses a few global transaction objects. Some of these objects may fall under these types: (i). connected to the database (ii) created and parameters set but still not connected & (iii). just been disconnected Is there a property or function that can be used to check if a particular transaction object is still connected to the DB? Thanks, Ravi "Ravi Kota" <rbkota@mciworld.com> wrote: [Reply posted to group and cc: to author as a courtesy (if no 'spam guard')] Please do not reply directly to the e...

Multiple Database Connection / Transaction Object
I need to make a nested report which containts data from two database source. How can I assign two different transaction object to each sub report within the report? Is it posible? Thanks Can you provide any more info on the different sources? Are they both the same type of database on the same server? Details about the situation may help us deliver a better solution. -bac Julius wrote: > I need to make a nested report which containts data from two database > source. > How can I assign two different transaction object to each sub report within > the re...

transaction object and database access errors
I am trying to trap errors returned from the database such as foreign key violations...is there any way to do this? Note that I have thought of this way after the fact...the code can't be placed in the datawindows. Thanks, Charles Sustek csustek@acep.org SQLCA.SQLDBcode will give you errors returned from the database. -- Terry Dykstra (TeamSybase) Please state PB / OS / DB versions in your post. MySybase http://my.sybase.com/mysybase Search Deja: http://www.pfcguide.com/_newsgroups/search.asp "Charles Sustek" <csustek@acep.org> wrote in message news...

Assigning a database handle to a transaction object
PB 8.0.1 on ASA Is it possible to assign a transaction object a database handle programmatically? I can retrieve a database handle from a transaction object using dbhandle(), but how can I assign it to a second transaction object?? Is this possible?? What are you trying to achieve here? Why not just use the same transaction object? -- Simon Caldwell Get Real Systems Ltd Holtby Manor, Stamford Bridge Road, York, YO19 5LL Tel +44 (0)1904 481999 Fax +44 (0)1904 481666 Visit us at www.getrealsystems.com Procurement Control Specialists Controlling corporate spend and st...

Coping Database objects from one database to another blank database.
I want to create a duplicate database   in sql 2000 using asp.net from a webform I created a database using CREATE DATABASE ....... But how to copy tables, views, stored procedures to newly created database from old using asp.net from webform Is there any another method to create a duplicate database with another name from existing database on same server ? yes you can do have another DB with different name and that has everything the same .....!!!Fadil Alnassar www.fadilalnassar.com | FREE Nodil Tab Controlhttp://www.mefranchising.com One way it can be done is with...

Finding if a transaction object is connected to the database?? #2
Hi, I am working with an application that uses a few global transaction objects. Some of these objects may be (i). connected to the database (ii) some may just be created and parameters set but not connected & (iii). some may have been just disconnected Is there a property or function that can be used to check if a particular transaction object is connected to the DB? Thanks, Ravi transaction_name.DBHandle ( ) returns value greater than 0 if connected. Ravi Kota wrote in message ... Hi, I am working with an application that uses a few global transaction ob...

Database Transaction Not being Committed until Proxy Object Destroyed
I have found some strange behaviour regarding DB transactions and I am wondering if I am doing something wrong or if this is a PB/Jaguar bug. All the code is PB based, the DB is ASA 7.0.3, Jaguar version 3.6.1. I have a component (A) which perform DB updates. It is set to Transaction Required. It is called from another component (B) which is set to Not Required. This component is called from a PB application. Both components are pooled. Component A connects to the connection cache which required and always ensures it is disconnected from the connection cache in the deactivate e...

Memory object oriented dataBase 4 PowerBuilder
I'm considering a non persistent object database library in powerscript for powerbuilder. It sound's a litle confuse description, but the goal is to archieve multiple instances of a class (like an array) but using linked lists and btrees. That way is possible to set indexes on some attributes of that objects use binary search for them. Advantages: Eficient insert and remove. Multiple indexes (composed ones is in consideration). All advantages of trees and lists. Fast search. Objects can be retrieved by order or distinct of an index. The problem is do this generic. ...

Help, Can I share a powerbuilder transaction just like ADODB connection object?
I want to migrate my powerbuilder application to IIS web. I don't want use EAS. But I want to share a powerbuilder transaction used by other PB com object just like ADODB conenction. It is pssible? ...

Transaction objects in PB6 shared objects?
Hi, I have developed a distributed application in PB6 which attempts to reduce database connections by holding them in a shared object. This works ok for datastores which are part of the shared object. An object created by a client can call a function in the shared object which returns some data from the shared object's datastore. But what about datastores in the server objects created by the client. I was hoping I could set the transaction object of such datastores to one of the transation objects in the shared object. But I can't get this to work. What I have to do is dupli...

Changing connection transactions to database transactions
Hi there, I have decided to move all my transaction handling from asp.net to stored procedures in a SQL Server 2000 database. I know the database is capable of rolling back the transactions just like myTransaction.Rollback() in asp.net. But what about exceptions? In asp.net, I am used to doing the following: <code>Try   'execute commands   myTransaction.Commit()Catch ex As Exception   Response.Write(ex.Message)   myTransaction.Rollback()End Try</code>Will the database inform me of any exceptions (and their me...

Backup databases with cross-database transactions
Hello, We have a financials application that is made up of multiple databases, one db for accounts receivable, one for accounts payable, etc... . Several transactions to these databases are made not to just one, but several of these databases, posting, for example.. So if I restored a particular database, there is a possibility that it will not be in sync with the other databases. Has anyone else worked in an environment like this, and if so, how did you apply your backup and recovery scheme. Any help would be greatly appreciated. Thanks Mike Well, this sounds like...

Compare model objects with database objects
Hello All, Is it posible to compare the PowerDesigner physical model with database? I know, than there is function "Tools->Compare Models", but i need to compare model with database. How do you apply changes created on model to database? PowerDesigner 11 (Physical Architect) and Sybase IQ 12.6. "Efka" <e.zinkevicius@it_spam_.lt> wrote in message news:427b11a4@forums-1-dub... > Hello All, > Is it posible to compare the PowerDesigner physical model with database? > I know, than there is function "Tools->Compare Models", but i ne...

Web resources about - UDF on transaction object - sybase.powerbuilder.database

Transaction cost - Wikipedia, the free encyclopedia
Bargaining costs are the costs required to come to an acceptable agreement with the other party to the transaction, drawing up an appropriate ...

Sheryl Sandberg, Peter Thiel, Mail.ru Group Involved In Notable Facebook Stock Transactions
Facebook shares were involved in some large transactions in recent days, with moves by Chief Operating Officer Sheryl Sandberg , board member ...

Twitter’s Site Upgrade Reveals New Social, Transaction Possibilities for Third Parties
Twitter has launched the biggest redesign in its company history, introducing a new interface for Twitter.com that makes it easier to share and ...

Transaction Network Services - LinkedIn
Learn about working at Transaction Network Services. Join LinkedIn today for free. See who you know at Transaction Network Services, leverage ...

DocuSign Transaction Rooms (formerly Cartavi) on the App Store on iTunes
Get DocuSign Transaction Rooms (formerly Cartavi) on the App Store. See screenshots and ratings, and read customer reviews.

Banks playing key role in reporting transactions with suspected terrorism links, Austrac says
Australia's financial intelligence agency Austrac is monitoring the financial DNA of those Australians likely to transfer money to fund Islamic ...

IDG Contributor Network: Avoiding ginormous transaction logs with SharePoint databases
There isn’t a week that goes by that I don’t hear or read about an organization seeing ginormous transaction log (.ldf) files, while the associated ...

FTC Bans Wire Transfers, Reloadable Cash Cards, And Payment Orders In Phone Transactions
We’ve shared warnings about many different types of telemarketing scams, but they all have one thing in common: they extract money from their ...

After asking UAE bank for $3 million ransom, hacker dumps tens of thousands of customers' transactions ...
He calls himself Hacker Buba, and he's shared tens of thousands of customers' complete financial information.

Check your credit card transactions: 54 Starwood hotels hit by malware
Third-party forensic experts have discovered that the point-of-sale systems in 54 Starwood hotels across the US and Canada were infected with ...

Resources last updated: 12/29/2015 9:43:10 AM