473,466 Members | 1,646 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Attribute on return value, how ??

Hi,

How do you set an attribue on a return value ??

In Microsoft.SqlServer.Server you got SqlFacetAttribute wich I need to use
on my CLR function that should return a SqlString(MAX) - the
SqlFacetAttribute must be set on the static methods return value to do this.

[SqlFunction(Name= "....")]
public static SqlString MyClrFunction(
[SqlFacet(MaxSize = -1)] SqlString ID,
[SqlFacet(MaxSize = -1)] SqlString Name,
)
{
return new SqlString("Some data"};
}

Where do I put the SqlFacetAttribute on my return value ??

In advance, thanx

Soren
Jan 13 '06 #1
2 8271
Arrhhh - just forget it, figured it out :-)

[SqlFunction(Name= "....")]
[return: SqlFacet(MaxSize = -1)]
public static SqlString MyClrFunction(
[SqlFacet(MaxSize = -1)] SqlString ID,
[SqlFacet(MaxSize = -1)] SqlString Name,
)
{
return new SqlString("Some data"};
}

Soren

"Soren S. Jorgensen" <no****@nodomain.com> skrev i en meddelelse
news:uC*************@TK2MSFTNGP14.phx.gbl...
Hi,

How do you set an attribue on a return value ??

In Microsoft.SqlServer.Server you got SqlFacetAttribute wich I need to use
on my CLR function that should return a SqlString(MAX) - the
SqlFacetAttribute must be set on the static methods return value to do
this.

[SqlFunction(Name= "....")]
public static SqlString MyClrFunction(
[SqlFacet(MaxSize = -1)] SqlString ID,
[SqlFacet(MaxSize = -1)] SqlString Name,
)
{
return new SqlString("Some data"};
}

Where do I put the SqlFacetAttribute on my return value ??

In advance, thanx

Soren

Jan 13 '06 #2
Soren S. Jorgensen wrote:
How do you set an attribue on a return value ??


Use [return: SqlFacet(MaxSize=-1)]

Basically it's like "assembly" or "param" attributes.

Jon

Jan 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave | last post by:
Hi, I tried something with 'return value' of a function and i got two different behaviours. My question is: why does method 1 not work? Thanks Dave method 1: here, whatever i choose (ok or...
9
by: Angel | last post by:
Hi again, I'm trying to call functions from a proprietary DLL but it's turned out to be more difficult than I thought. I have this W32.DLL which was written in C by USPS. They don't provide the...
2
by: Hans Kesting | last post by:
Hi, For a problem I'm having a solution could be to apply the SoapAttributeAttribute to the return value of my method. The documentation says it's possible, even the errormessage I'm getting...
3
by: tshad | last post by:
I am trying to set up a class to handle my database accesses. I can't seem to figure out how to get the return value from my dataReader from these routines (most of which I got elsewhere). They...
20
by: weston | last post by:
I've got a piece of code where, for all the world, it looks like this fails in IE 6: hometab = document.getElementById('hometab'); but this succeeds: hometabemt =...
8
by: bdobby | last post by:
Hi. I am relatively new to js, but I did think I was starting to get the hang of it. Then this happened... I have a form with an onsubmit event handler: <form id="uploadForm" method="post"...
20
by: lovecreatesbeauty | last post by:
Hello experts, Is the following code snippet legal? If it is, how can exit() do the keyword return a favor and give a return value to the main function? Can a function call (or only this...
6
by: Tim Roberts | last post by:
I've been doing COM a long time, but I've just come across a behavior with late binding that surprises me. VB and VBS are not my normal milieux, so I'm hoping someone can point me to a document...
2
by: philip | last post by:
hello, i am new to asp.net and sql server, and i have 3 questions for asking: 1. i am writing a store procedure of login validation for my asp.net application and wondering what the different...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.