PC Review


Reply
Thread Tools Rate Thread

2 questions about reading value from scalar UDF

 
 
=?Utf-8?B?QWJl?=
Guest
Posts: n/a
 
      12th Feb 2004
I'm new to adp but am pretty proficient with vba and Access dao development. I am trying to use roles to dynamically control my forms with the UDF that I created to report back which role a user is grouped into

CREATE FUNCTION dbo.GetRol

@Role_Name varchar(12) = '
)
RETURNS varchar(12)
A
BEGI
IF (is_member('dbo') = 1
set @Role_Name = 'dbo
ELS
IF (is_member('CTS_MGMT') = 1
set @Role_Name = 'CTS_MGMT
ELS
IF (is_member('CTS_PM') = 1
set @Role_Name = 'CTS_PM
ELS
IF (is_member('CTS_RO') = 1
set @Role_Name = 'CTS_RO
ELS
IF (is_member('CTS_Finance') = 1
set @Role_Name = 'CTS_Finance
RETURN @Role_Nam
EN
I have two questions:
1) Why if I try to run the function from "queries" or try to open a recordset based on this function it acts like a parametized query and askes for a value for @Role_Name
an
2) How do I retrieve the value returned in Access? If I use a recordset, no label is visible (i.e. rst!GetRole does not work) ( select dbo.getrole('') from query analyzer works, but as before requires a parameter - the ""
Thank you very much for any insight as to how this should work.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scalar-Valued UDF Function =?Utf-8?B?R3JlZw==?= Microsoft Access ADP SQL Server 2 21st Sep 2006 04:56 AM
UDF -> 256-Char -> UDF = "#VALUE!" Greg Lovern Microsoft Excel Programming 1 8th Sep 2006 08:22 AM
scalar UDF question in Access ADP JD Microsoft Access ADP SQL Server 5 10th Apr 2005 05:24 AM
SCALAR LENGTH VALUE =?Utf-8?B?bWps?= Microsoft Access Queries 1 14th Dec 2003 07:21 AM
ReturnValue of Scalar UDF JT Microsoft ADO .NET 0 22nd Sep 2003 06:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:06 AM.