Click here to Skip to main content
15,922,145 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: HOW COULD I ? Pin
Luc Pattyn27-Aug-10 4:12
sitebuilderLuc Pattyn27-Aug-10 4:12 
GeneralRe: HOW COULD I ? Pin
Ian Shlasko27-Aug-10 5:17
Ian Shlasko27-Aug-10 5:17 
AnswerRe: HOW COULD I ? Pin
Dalek Dave27-Aug-10 3:37
professionalDalek Dave27-Aug-10 3:37 
GeneralRe: HOW COULD I ? Pin
Yusuf27-Aug-10 12:28
Yusuf27-Aug-10 12:28 
AnswerRe: HOW COULD I ? Pin
Jason Vetter27-Aug-10 3:41
Jason Vetter27-Aug-10 3:41 
AnswerRe: HOW COULD I ? Pin
The Man from U.N.C.L.E.27-Aug-10 6:19
The Man from U.N.C.L.E.27-Aug-10 6:19 
AnswerRe: HOW COULD I ? Pin
Luc Pattyn27-Aug-10 6:51
sitebuilderLuc Pattyn27-Aug-10 6:51 
GeneralRe: HOW COULD I ? Pin
Yusuf27-Aug-10 12:29
Yusuf27-Aug-10 12:29 
AnswerRe: HOW COULD I ? Pin
LloydA11127-Aug-10 10:49
LloydA11127-Aug-10 10:49 
AnswerRe: HOW COULD I ? Pin
Abhinav S30-Aug-10 6:05
Abhinav S30-Aug-10 6:05 
QuestionProblem filling a dataset from SQL Server view Pin
Steven J Jowett25-Aug-10 22:39
Steven J Jowett25-Aug-10 22:39 
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? PinPopular
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 
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 
Hi Luc

Thanks for your explanation.

This sentence of yours get my attention

Luc Pattyn wrote:
You can pass a value (ByVal) or a reference (ByRef, it boils down to the address of a value)


So, If I used Byref, (I am guessing here) The parameter inside the function header should have pointer/link to the calling variable, so later on, the parameter declared by "ByRef" will send the value back to the calling variable.

How the parameter knows which variable?

The real requirement for my question is this:
I am creating a generic function that able to update single field in a table, the function look like this
Update(TableName,FieldName,FieldValue,pkName,pkValue)

calling the function is like this
Update("customers","Address","USA","id",4)

that will update the address field in customer table where id = 4.
What I am trying to do is reducing the number of the parameter in this function to be
Update(TableName,FieldValue,pkValue)

and call it by
Dim address as string = "USA"
Dim id as integer = 4
Update("Customers",address,id)

where address is acting as 2 things
1- the field name inside the table as "address"
2- the field value which need to be updated as "USA"

That was my idea, it seem it will not see the light Smile | :)
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 

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.