|
Thanks for the reply,I think last time also u replied me.
I am fresher in .NET & working on it.
wana to see your profile if you dont mind
Thank you
Yogesh_T
|
|
|
|
|
Hi guys,
How can you hardcode the combo box to accept only uppercase characters. It is possible to do this during initialization with textboxes but I can't figure out how to do it for a combo box.
Thank you
sasa
|
|
|
|
|
for this i think u have to create array of strings
which u can add to combobox items one by one
and at the time of adding these strings u can convert them in
upper case.
rahul
|
|
|
|
|
Thank you Rahul. I just figured out; it's much easier than what you suggested. All I had to do is use the ToUpper function as follows;
this.CboxUName.Text.ToUpper()
Thanks for your suggestion though.
sasa
|
|
|
|
|
Hi guys,
I am a newbie in visual C#. Quick question for you pros; how do you load data from SQL table into a Combo Box?
Thank you in advance for your help.
|
|
|
|
|
Take a look at MSDN SqlDataReader class[^].
Hope that gets you started in the right direction.
Sincerely,
Alexander Wiseman
|
|
|
|
|
its easy ..
Like This :
//DataTable that has columns named "mnStatusName" and "mnStatusID"
DataTable dt = new DataTable();
cmb.DataSource = dt;
cmb.DisplayMember = "mnStatusName";
cmb.ValueMember = "mnStatusID";
thats all
And you can use Collections like a DataTable;
i m filling all my combos from SQL tables..
mca
|
|
|
|
|
Hi guys,
Please help!
I am running this query which returns a count(), How do I store the count that way I can run the if/else statement.
Check it out:
SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=CBae;Integrated Security=SSPI;");
conn.Open();
SqlCommand cmd = new SqlCommand("SELECT COUNT(CBID) FROM CB", conn);
cmd.ExecuteNonQuery();
conn.Close();
if (////// >0)
MessageBox.Show(this,"Data Exists",MessageBoxButtons.OK,MessageBoxIcon.Information);
sasa
|
|
|
|
|
sasa,
Use ExecuteScalar instead of ExecuteNonQuery . The return value is the value very first "cell" of the very first row returned from the query, which, in the case of the COUNT command, is the only value returned at all.
Hope that helps!
Sincerely,
Alexander Wiseman
|
|
|
|
|
Thank you Alexander. It worked.
sasa
|
|
|
|
|
Heres a question thats been floating around in the back on my head since starting to work with the .NET Framework.
Lets say I have produced a Widget application, this application is made up of a main executable and a series of referenced dll assemblies. In the first release of the application everything is version 1.0.0.0. Now lets say that the code in one of the assemblies has to change, this update doesnt change any of the methods just the code within them, and this change merits a version update. So now I have my exe and some dlls at version 1.0.0.0 and the updated assembly at 1.1.0.0.
In the situation above I have found that I cannot simply drop the new assembly onto the install and expect things to continue working. I have to replace all files in order for them to pick up the new referenced version.
However if I do not change the version everything continues to work as normal.
Now for the sake of release management it is obviously more sensible to change versions. So the question is what can I do to prevent having to redeploy Xmb of code becuase a 10kb dll has changed.
|
|
|
|
|
is it possible to find on the web free hosting ? i want to put my web service only for 4 days on the web.. i need windows hosting with ODBC ,i know this is not the kind of forum for this question...i saw also very cheap hosting on the web but i don't have that kind of credit card to pay on the internet ....
|
|
|
|
|
www.hamachi.cc will give you a static IP, then you can host it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hmm sounds good , but can i access it on the internet or only on that private network (that virtual LAN that hamachi creates)?
the problem is i want to access my web service from a mobile device so it must be accessible on the internet ...or maybe i'will do it on that private network ...so what are the posibilities!
Thanks for the first ideea ,i will instal hamachi now too see how it works!
-- modified at 20:07 Thursday 15th June, 2006
|
|
|
|
|
A VPN is a network that works over the web. I use hamachi to access VSTS on a machine I can only see over the web.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Can any body tell me what is the need of calling this function, when we can set the properties without calling this.
Please dont get annoyed. I am a starter.
|
|
|
|
|
|
Some components require some dependant components to be initialized at design-time. Look at some controls (like the Timer) that uses this. MSDN will also give you some nice info on why to use this interface.
|
|
|
|
|
We have a startup form for all our application. What is the best practice to share this form across every single application.
we don't want to add the form to an application because a change in that startup form need to be change and recompile for every single app.
we are thinking about dll but can dll support graphical controls.
Is there a good practice for this case? any suggestion?
Donkaiser
|
|
|
|
|
no
theres no need to share a form like that
Find a different design
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Create a class library that contains the form and the code to display it then compile that into a DLL and call that from all your other apps.
My Blog[^] FFRF[^]
|
|
|
|
|
donkaiser wrote: can dll support graphical controls
Yes.
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
do you know any good examples on how to make a form into dll and how to call it?
Donkaiser
|
|
|
|
|
10 easy steps:
1) File->New->Project->Visual C#->Windows->Class Library
name it whatever you want (CP_DLLTest)
2) Project->Add New Item->Windows Form
Name it whatever you want (CP_DLLForm)
3) Build the DLL
4) File->New->Project->Visual C#->Windows->Windows Application
6) Project->Add Reference->Browse
Locate your DLL
7) place the correct namespace at the top of Form1.cs in the Windows Application
using CP_DLLTest;
8) Declare a class level object using the form name from the dll
private CP_DLLForm myTestForm = new CP_DLLForm();
9) Add a button to Form1 in your Windows Application
10) Show the class level form object
myTestForm.Show();
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|