|
Ronald Bastien wrote:
CallingSomething(MailingAddress)
cant you just put "MailingAddress", including the quotes, as the paramater to pass to the CallingSomething procedure?
------------------------
Jordan.
III
|
|
|
|
|
I could but I'm already passing the object so I don't want to pass the name as well. This object can also be passed down through an hierachy of calls and again, I don't want to have to pass the name with the object.
Cheers.
Ronald Bastien
Strategium Technologies inc.
|
|
|
|
|
i must not be understanding, or too new at this.
"
public sub CallingSomething(objAddress as Address)
'display the name of the variable of objAddress as it is known in my Class Organisation. The display should be "MailingAddress".
end sub
"
if you send the string "MailingAddress" to this procedure, from the CallSomething procedure, it will do what it says you want here:
"The display should be "MailingAddress."
sorry im
what are you going to do with the variable name once it is passed? just display it?
------------------------
Jordan.
III
|
|
|
|
|
Jordan, You're right but I'm oversimplyfying my code to give an example of what I'm looking for.
Is it possible in the CallingSomething routine to access the objAddress object and through some property (from the framework) get the name the variable from the caller?
The thing is, I need to pass the object so I don't want to pass an additional string with it's name. I'm also passing this object to other routines so this makes it a less attractive solution.
Cheers
Ronald Bastien
Strategium Technologies inc.
|
|
|
|
|
hmmm... sorry
iv been looking into it, and fooling around, and of course cant figure it out. i hope someone can help.
please let me know the solution, if one arises, Ron.
gNite.
------------------------
Jordan.
III
|
|
|
|
|
Unless I'm mistaken (which could certainly be the case) the ability that you're looking for is contained in the System.Reflection namespace.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
There is no way to do this in C#. System.Diagnostics.StackFrame gets the closest, but it does not know about instance information; only types.
There is a probably a more natural way to get what you want. Maybe passing in an object which has Address members and letting CallingSomething iterate it's members looking for them? Then it could output all the members which have a certain type by name.
Without knowing more about the requirements, it's hard to say.
--
Aaron
|
|
|
|
|
what doe it mean by this....
An unhandled exception of type 'System.Data.OleDb.OleDbException'
occurred in system.windows.forms.dll
can somebody tell me?
|
|
|
|
|
An error occurred while you were performing a database operation or attempting to access a database.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
owh.....hmmm....is it maybe because i input the wrong data type?
|
|
|
|
|
OleDbException is generic for lots of things. Depends on what you were trying to do and what your code looks like.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
one more thing....what exactly insertcommand.executenonquery do?
|
|
|
|
|
Assuming that "insertcommand" refers to an instance that has been initialized as an OleDbCommand object that has its command text set to an "INSERT INTO ..." statement, then insertcommand.ExecuteNonQuery() should execute the command without returning the affected records.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
John Kuhn wrote:
without returning the affected records.
what does it mean?
|
|
|
|
|
MSDN: Executes a SQL statement against the Connection and returns the number of rows affected.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
owh....ok...thanx man...sorry for taking your time
|
|
|
|
|
Hi,
Does someone knows how to get the default icon from other applications without using Windows APIs?
Any ideas could be very helpfull,
Thanks in advance
|
|
|
|
|
I have developed a data entry form and set the tab order, but in entering data, it seems more intuitive to use the Enter Key than the Tab to change the focus to the next text box. Is there a way to make these two keys work the same way in this application?
Thanks!
nvmoss
|
|
|
|
|
you could trap for keycode of 13
|
|
|
|
|
Thanks!
I'm new at this.
I assume that key code 13 is the Enter key, but how do I "trap" it?
Thanks Again!
nvmoss
|
|
|
|
|
You "trap" it by adding this code in the KeyDown event
If e.KeyCode = Keys.Enter Then
End If
HTH
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
Support Bone
It's a weird Life
|
|
|
|
|
I don't know why, but KeyPress tends to work better for this (for me, at least) than KeyDown .
' include whatever controls you want to have this functionality
Private Sub KeyPressed(ByVal sender As Object, ByVal e As KeyPressEventArgs) Handles _
TextBox1.KeyPress, TextBox2.KeyPress, TextBox3.KeyPress, TextBox4.KeyPress
If e.KeyChar = ChrW(13) Then
ProcessTabKey(True)
e.Handled = True
End If
End Sub
This isn't the only way to do what you want, but it works.
Charlie
if(!curlies){ return; }
|
|
|
|
|
Hi,
Help me, how we can create windows local user by program.
srinivasraom
|
|
|
|
|
Hi ,,,
I have made an application which uses CrystalReport 8.5 Viewer(that comes with .net setup). I made a setup so that the client can view the reports. I read in the help file that to include all the files for CrstalDecisions we need to include 3 Msm files i.e. merge modules in the setup. They are MANAGED_ENU.MSM, DATABASE_ACCESS_ENU.MSM, REGWIZ.MSM. I couldnt find MANAGED_ENU.MSM, instead of it I included MANAGED.MSM. I also couldnt find DATABASE_ACCESS_ENU.MSM, instead of it I included DATABASE_ACCESS.MSM. They contain the files needed for CrystalDecisions. But when I included REGWIZ.MSM , it doesnt show me any files in the list(When we see the file list in Mergemodule by including it in the setup). It shows empty list. As per the help file, REGWIZ.MSM contains a file called KEYCODEV2.DLL. But its missing in the MSM FILE. And the error I am getting when I try to open the report at clients place is "INVALID KEY CODE". So where should I find these three files so that I can include it in the project. I searched it on the net but could nt get any of these files.
What are the other options for this error???
Thanks Tasnim
|
|
|
|
|
I got this error once when i registered .net. What i did to correct the problem if this helps at all i uninstalled the crystal reports portion of the .NET installation and reinstalled.This seemed to correct my problem hope this helps.
|
|
|
|