|
I've finshed my project but I could not run my program on other computer.
I tried update .NET framework 2.0 but it still not work.
How can I make sure my program will run on every PC (XP Sp2 + .NET 2.0)
|
|
|
|
|
If you've installed .NET 2.0, then you must be using another component that you need to install. What's the error - if you have .NET installed, it should run enough to tell you what it needs.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
What you are talking about is "deploying applications".
You find (almost) all you need here[^].
SkyWalker
|
|
|
|
|
Even when I use deploying, it is error. Pop up window shown "application error and need to close". That's all. It does not tell me anything.
|
|
|
|
|
Something must go wrong.
Try a debug version of your application on the computer where it doesn't work. You need to get more information on what's going on.
SkyWalker
|
|
|
|
|
I found out that I included some library which is not common amoung XP SP2.
After removed this outeverything work fine.
Thank you very much
|
|
|
|
|
Good
SkyWalker
|
|
|
|
|
Hi,
I have function that is in my class file (ojblib.c) this function is returning a single value based from my select statement. Could someone please help me on how to return 2 to 3 value at the same. Is dataset correct or is there any other way to return a value?
Name.Text = GetValue("Select username,tel,addres from employee where id=123");<br />
<br />
function string GetValue(string TxtSel)<br />
{<br />
string svalue="";<br />
objcon.Open()<br />
objcmd = new sqlcommand(TxtSel,objcon);<br />
svalue = objcmd.executescalar().ToString();<br />
objcon.close()<br />
return svalue.ToString();<br />
}
Thanks
/Dabuskol
Dabsukol
|
|
|
|
|
you can pass ref(ByRef in VB) parameters :
<br />
function string GetValue(string TxtSel,ref string Return1, ref string Return2)<br />
|
|
|
|
|
You can also use the out keyword. In contrast to the ref keyword, it doesn't require the so marked variable to be initialized before the method call.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Actually, the big difference is your function cannot return before assigning a value to an out parameter.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for the addition Didn't knew this as I've never used out parameters myself.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
you can also define a struct that contains the values and return that
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
... we could even generalize to a type ...
SkyWalker
|
|
|
|
|
You could return an object []
SkyWalker
|
|
|
|
|
Yes, you can return a data set. You can also return a data table, an array, a list or a collection.
A lot of people have suggested using ref or out , but I would advice against those in this case. They are more funcional than object oriented, and are mostly used for interfacing with components written in other languages and for perfomance tweaking. It's for example used in the Int32.TryParse method to avoid creating an object as return value, but you are creating so many objects in you function anyway that there is no reason for you to avoid creating another one.
---
Year happy = new Year(2007);
|
|
|
|
|
Guys, please try to remember what we learnt back at school.
A function should return only one parameter. Like Christian wisely said, returning a structure is the only "nice" way of doing it.
Everything that would disguise a function so that it can return more than one value, by using ref variable for instance, is making in fact a procedure. if so then please, make a procedure
|
|
|
|
|
I have done a c# windows application, It should be automatically adaptable for all the screen resolution like 1024x768 or 800x600 and (ect) .how to do this?
we are in illusionary life
|
|
|
|
|
Take a look at the Control.Dock and Control.Anchor properties. To start your form in maximized mode set the Form.WindowState property.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
Hello All
How can I UpLoad Text File from Client to Server using C# and Asp.net2?
Ala Qunaibi
Ala Qunaibi
|
|
|
|
|
|
how do i exit a function. in basic there is an axit statement , but i can'd find it in c#.
rzvme
|
|
|
|
|
try the "return;"
once you are done with your statements then it will automatically exit the function. It depends on your needs.
Dabsukol
|
|
|
|
|