Click here to Skip to main content
15,895,011 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Problem filling a dataset from SQL Server view Pin
Goutam Patra25-Aug-10 23:03
professionalGoutam Patra25-Aug-10 23:03 
GeneralRe: Problem filling a dataset from SQL Server view Pin
Steven J Jowett25-Aug-10 23:23
Steven J Jowett25-Aug-10 23:23 
AnswerRe: Problem filling a dataset from SQL Server view Pin
Sam Martini26-Aug-10 3:06
Sam Martini26-Aug-10 3:06 
AnswerTry returning 1 column at a time Pin
David Mujica26-Aug-10 3:15
David Mujica26-Aug-10 3:15 
QuestionHow to call a function after unordered input? Pin
sanyexian25-Aug-10 21:23
sanyexian25-Aug-10 21:23 
AnswerRe: How to call a function after unordered input? Pin
Steven J Jowett25-Aug-10 22:21
Steven J Jowett25-Aug-10 22:21 
QuestionGet the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 12:06
Sam Martini25-Aug-10 12:06 
AnswerRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 12:25
sitebuilderLuc Pattyn25-Aug-10 12:25 
Nope. You can pass a value (ByVal) or a reference (ByRef, it boils down to the address of a value); a function/method cannot discover how it got what it got or how it used to be called inside the caller.
So

Dim a as int = 123
Dim b as int = 123
myfunc(a)
myfunc(b)
myfunc(123)


all look the same when looking at the parameter from inside myfunc.

And that is all right for almost all situations. A function should react on its input values, they make the "contract". The one time I regret not being able to get the name is to simplify logging, where one would want to write

log(a)
log(b)


to get the output
a = 123
b = 123


but alas that is not possible.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 13:21
Sam Martini25-Aug-10 13:21 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 13:32
sitebuilderLuc Pattyn25-Aug-10 13:32 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 13:54
Sam Martini25-Aug-10 13:54 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 13:59
sitebuilderLuc Pattyn25-Aug-10 13:59 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini25-Aug-10 14:20
Sam Martini25-Aug-10 14:20 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 14:22
sitebuilderLuc Pattyn25-Aug-10 14:22 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler26-Aug-10 2:55
johannesnestler26-Aug-10 2:55 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini26-Aug-10 4:21
Sam Martini26-Aug-10 4:21 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler3-Sep-10 23:05
johannesnestler3-Sep-10 23:05 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini5-Sep-10 6:55
Sam Martini5-Sep-10 6:55 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler5-Sep-10 12:17
johannesnestler5-Sep-10 12:17 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini5-Sep-10 23:49
Sam Martini5-Sep-10 23:49 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Dave Kreskowiak26-Aug-10 3:37
mveDave Kreskowiak26-Aug-10 3:37 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Sam Martini26-Aug-10 4:46
Sam Martini26-Aug-10 4:46 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
johannesnestler3-Sep-10 23:18
johannesnestler3-Sep-10 23:18 
JokeRe: Get the Variable name which passed the value to the Parameter Pin
Peter_in_278025-Aug-10 13:48
professionalPeter_in_278025-Aug-10 13:48 
GeneralRe: Get the Variable name which passed the value to the Parameter Pin
Luc Pattyn25-Aug-10 13:56
sitebuilderLuc Pattyn25-Aug-10 13:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.