PC Review


Reply
Thread Tools Rate Thread

Re: How do you capture the value of a local variable from SQL Server?

 
 
Tom van Stiphout
Guest
Posts: n/a
 
      25th Mar 2008
On Tue, 25 Mar 2008 12:43:08 GMT, "acraft" <u42371@uwe> wrote:

You need to put that T-SQL code in a stored procedure, and return the
string via an OUTPUT parameter.

-Tom.


>How do you capture this variable from SQL Server?
>Example of T-SQL code:
>
>declare @strVariable varchar(20)
>set @strVariable = 'This was a success...'
>select @strVariable as NEW_FIELD
>
>How do I capture the returned value "This was a success..." without creating
>a temporary table on the SQL Server? I am using MS Access and trying to use
>the ADO.Recordset.
>
>
>Should I use a different method? Any suggestions or sample code?

 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      25th Mar 2008
On Tue, 25 Mar 2008 07:13:04 -0700, Tom van Stiphout
<(E-Mail Removed)> wrote:

Oops, Brendan is right. You can return it from a Select statement as
well.
-Tom.


>On Tue, 25 Mar 2008 12:43:08 GMT, "acraft" <u42371@uwe> wrote:
>
>You need to put that T-SQL code in a stored procedure, and return the
>string via an OUTPUT parameter.
>
>-Tom.
>
>
>>How do you capture this variable from SQL Server?
>>Example of T-SQL code:
>>
>>declare @strVariable varchar(20)
>>set @strVariable = 'This was a success...'
>>select @strVariable as NEW_FIELD
>>
>>How do I capture the returned value "This was a success..." without creating
>>a temporary table on the SQL Server? I am using MS Access and trying to use
>>the ADO.Recordset.
>>
>>
>>Should I use a different method? Any suggestions or sample code?

 
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
Threading and outer-variable semantics, local variables capture inanonymous methods--why? RayLopez99 Microsoft C# .NET 3 15th Feb 2010 10:22 AM
VBA IIf(myCell.Value = Array(myCell2(1).Value, myCell2(2).Value,myCell2(3).Value,myCell2(4).Value) ,"OK","No Match) EagleOne@discussions.microsoft.com Microsoft Excel Programming 2 24th Apr 2009 11:25 PM
Re: How do you capture the value of a local variable from SQL Server? Brendan Reynolds Microsoft Access VBA Modules 0 25th Mar 2008 03:18 PM
Re: Question??? You know when you double click in a username field you see your previous entries? How do you reset this so you can see your entries again. Thorsten Matzner Windows XP New Users 0 5th Jun 2004 04:34 PM
Question??? You know when you double click in a username field you see your previous entries? How do you reset this so you can see your entries again. =?Utf-8?B?Y2hyaXM=?= Windows XP General 1 3rd Jun 2004 08:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:38 PM.