[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Getting Varbinary in C#.

Archana

3/1/2007 7:08:00 AM

Hi all,

I want to return text datatype from stored procedure. So what i did is
used varbinary as output paramter to stored procedure.

My Store procedure is
CREATE proc test_text
@outtext varbinary(16) output
AS
begin
declare @ptr varbinary(16)
select @ptr = TEXTPTR(addr) from emp where id = '1000110109'
print @ptr
set @outtext = @ptr
end
GO

How will i get actual address in code which i have written in c#.

Means how to convert varbinary to string in C#.

Any help will be truely appreciated.

thanks in advance.

3 Answers

Erland Sommarskog

3/1/2007 8:27:00 AM

0

Archana (trialproduct2004@yahoo.com) writes:
> I want to return text datatype from stored procedure. So what i did is
> used varbinary as output paramter to stored procedure.
>
> My Store procedure is
> CREATE proc test_text
> @outtext varbinary(16) output
> AS
> begin
> declare @ptr varbinary(16)
> select @ptr = TEXTPTR(addr) from emp where id = '1000110109'
> print @ptr
> set @outtext = @ptr
> end
> GO
>
> How will i get actual address in code which i have written in c#.
>
> Means how to convert varbinary to string in C#.

You can do much with that pointer in C#. You need to use the READTEXT
function in your stored procedure to receive the string value.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/...
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/...

Yaako Warrior from AUZ, Germany, RSA, USA, Sweden, Hong Kong, Canada, Russia, China, Denmark, UK, ..

11/27/2008 10:15:00 AM

0



DVH wrote:

> <markzoom@digiverse.net> wrote in message
> news:a6a689dd-1888-4968-959c-4a8cdadec778@s20g2000yqh.googlegroups.com...
> > On 27 Nov, 11:48, "DVH" <d...@vhvhvhvh.com> wrote:
> >> "Some media reports attributed the attack to Lashkar-e-Taiba. There were
> >> also unconfirmed reports that some of the terrorists came in by sea. A
> >> boat
> >> laden with explosives was recovered later at night off the Gateway of
> >> India."
> >>
> >> http://timesofindia.indiatimes.com/Terror_attacks_in_Mumbai......
> >>
> >> "The Lashkar's 'agenda', as outlined in a pamphlet titled Why are we
> >> waging
> >> jihad includes the restoration of Islamic rule over all parts of India...
> >>
> >> The outfit's headquarters (200 acres) is located at Muridke, 30 kms from
> >> Lahore, which was built with contributions and donations from the Middle
> >> East, with Saudi Arabia being the biggest benefactor."
> >>
> >> http://www.satp.org/satporgtp/countries/india/states/jandk/......
> >>
> >> "The Lashkar-e-Taiba group has repeatedly claimed through its journals
> >> and
> >> websites that its main aim is to destroy the Indian republic and to
> >> annihilate Hinduism and Judaism. LeT has declared Hindus and Jews to be
> >> the
> >> "enemies of Islam", as well as India and Israel to be the "enemies of
> >> Pakistan" (wikipedia).
> >
> > Sounds dubious to me. Is it another Bin (I'm not a CIA asset , honest)
> > Laden type thing?
>
> Not sure what you mean. Could you be a little more specific...

It means he's going to ignore Islam when it comes for the Hindus.
When islam comes for the Sudanese, Ethiopians and Nigerians, he will
pretend nothing's amiss.
He'll continue ignoring Islam when it comes for the dutch.
When Islam comes for the Danes, the Swedes and the Norwegians, he will
do nothing.
When Islam comes for Western Sydney, he will ignore it.
When Islam finally gets to him, he will wonder why there's nobody left
to defend his Human Rights and he will be forced to convert to Islam
or be killed.

andycooper3

11/28/2008 2:43:00 AM

0

On 27 Nov, 11:15, henry.peregrine.law...@gmail.com wrote:
> DVH wrote:
> > <markz...@digiverse.net> wrote in message
> >news:a6a689dd-1888-4968-959c-4a8cdadec778@s20g2000yqh.googlegroups.com...
> > > On 27 Nov, 11:48, "DVH" <d...@vhvhvhvh.com> wrote:
> > >> "Some media reports attributed the attack to Lashkar-e-Taiba. There were
> > >> also unconfirmed reports that some of the terrorists came in by sea. A
> > >> boat
> > >> laden with explosives was recovered later at night off the Gateway of
> > >> India."
>
> > >>http://timesofindia.indiatimes.com/Terror_attacks_in_Mumbai......
>
> > >> "The Lashkar's 'agenda', as outlined in a pamphlet titled Why are we
> > >> waging
> > >> jihad includes the restoration of Islamic rule over all parts of India...
>
> > >> The outfit's headquarters (200 acres) is located at Muridke, 30 kms from
> > >> Lahore, which was built with contributions and donations from the Middle
> > >> East, with Saudi Arabia being the biggest benefactor."
>
> > >>http://www.satp.org/satporgtp/countries/india/states/jandk/......
>
> > >> "The Lashkar-e-Taiba group has repeatedly claimed through its journals
> > >> and
> > >> websites that its main aim is to destroy the Indian republic and to
> > >> annihilate Hinduism and Judaism. LeT has declared Hindus and Jews to be
> > >> the
> > >> "enemies of Islam", as well as India and Israel to be the "enemies of
> > >> Pakistan" (wikipedia).
>
> > > Sounds dubious to me. Is it another Bin (I'm not a CIA asset , honest)
> > > Laden type thing?
>
> > Not sure what you mean. Could you be a little more specific...
>
> It means he's going to ignore Islam when it comes for the Hindus.
> When islam comes for the Sudanese, Ethiopians and Nigerians, he will
> pretend nothing's amiss.
> He'll continue ignoring Islam when it comes for the dutch.
> When Islam comes for the Danes, the Swedes and the Norwegians, he will
> do nothing.
> When Islam comes for Western Sydney, he will ignore it.
> When Islam finally gets to him, he will wonder why there's nobody left
> to defend his Human Rights and he will be forced to convert to Islam
> or be killed.

Have you seen a psychiatrist lately? Paranoia can be very serious.