|
It's clearly a homework question.
|
|
|
|
|
there is a table in database, having feild StationName & pk as stationID.
Now i am adding the StationName in chekedlistBox control and also using stationID in Tag property for each item i add.
after this what i want to do if a user check 1 or more item from list, then all those items deleted/updated(whatever function i want to perform) ona button click.
I am doing this as:
a) On form load event populating the CheckedListBox control.
b) On Button click event performing my action.
IEnumerator myEnum = chkList.CheckedIndices.GetEnumerator();
string SQL;
while(myEnum.MoveNext() != false)
{
SQL = "Update A Set [xyz] = 1 where [stationID] =" chkList.Tag.Tostring();
ExecuteSQL(SQL);
}
the tag property is not giving the corresponding stationID for stationName.
What is wrong?
Also how to use foreach loop for chekedListBox items?
|
|
|
|
|
humdumof wrote: What is wrong?
humdumof wrote: SQL = "Update A Set [xyz] = 1 where [stationID] =" chkList.Tag.Tostring();//sample query
You need a + to concatenate strings.
|
|
|
|
|
leppie wrote: You need a + to concatenate strings.
i miss type here?
that i know........??
problem is TAG property not giving the corresponding StationID for StationName which user selected
|
|
|
|
|
Yes, that will happen, because you are referring to the same checklist object all the time.
You need to cast the current enumerated object to what you put in there, and then get the value.
|
|
|
|
|
leppie wrote: You need to cast the current enumerated object to what you put in there, and then get the value.
how to do that?
(datatype)myEnum.Current ??
but how to get the item name(text)...???
|
|
|
|
|
That depends on the data type you passed into it.
|
|
|
|
|
I am willing a create C# windows application and wanted to distribute it through internet.But I came to know the the .net assemblies can be decompiled.There are so many Obfuscaters avilable but i don't have money to buy that. Can anybody suggest anything other than Obfuscaters.
|
|
|
|
|
I believe VS 2008 comes with a obfuscater community edition which will be free.
|
|
|
|
|
can i use it for 2.0 applications and does Obfuscaters protect my code 100 %.
|
|
|
|
|
Member 1739685 wrote: does Obfuscaters protect my code 100 %.
No. But by asking this question, you likely will not need one. If you have some serious IP to hide, write it in C/C++.
|
|
|
|
|
No . I don't want anybody to see my code.It is not a case of IP or something like that
|
|
|
|
|
If its something ground breaking, get a patent. You wont be able to stop someone 100% from reading your code.
Why are you worried about people seeing your code anyways?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
No commenting
|
|
|
|
|
Don't say some bullshit if you don't know the answer.
Every company is concerned about their source code.
I am creating a product by after a lot of hardwork.
Someone simply decompiling my code a creating a new version of it.
what is the meaning in that.
|
|
|
|
|
And that's why company's get patents.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
You do know that IP stands for Intellectual Property, don you? That would be the only thing that you would really want to protect in the first place.
Regards,
Thomas Stockwell
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.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
If you happen to be knowledgable in a programming aspect you can always write an outstanding article and if you are chosen in the CodeProject monthly competition for best article you can get one for free (depending on language and month).
Regards,
Thomas Stockwell
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.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hi,
The code below gives this error:
Cannot implicitly convert type 'System.Collections.Generic.List<DataAccess.clsSetting>' to 'DataAccess.clsSetting'
Any thoughts please?
DataAccess.clsSetting s = DataAccess.clsSettingDB.GetSetting(strSelectedItem);
'in case you would like to know what GetSetting does:
public static List<DataAccess.clsSetting> GetSetting(string strSelectedItem)
{
//some code here...
return genericlist
}
|
|
|
|
|
DataAccess.clsSettingDB.GetSetting returns a List<DataAccess.clsSetting> and you are trying to assign to a DataAccess.clsSetting object. That is the error.
|
|
|
|
|
Hi Guys,
A vendor of ours has given me the source code for one of his applications. This is a MFC based form (in VC++) which uses the vendor's own .lib file for its actual functionality (i.e. actual communication with device).
Now I need to make a similar application but in C#. For this I need to take the LIB file as provided with the source code, and use it in my C# application.
But I cannot find anyway to do this. C# only binds DLLs, right?
I tried to wrap the LIB in a DLL (MFC shared), but since i really dont know how the lib is made, and moreover, the lib gives out some enum datatypes from its functions (as paramter & return types), i am not able to successfully create this DLL.
Does anyone know any other way for using a C++ LIB in a C# App??
Thanks a lot guys!
|
|
|
|
|
Compile the C++ code with the CLR compiler flag, also add some managed C++ wrappers in there to expose to .NET. Simply reference the new assembly (yes, its an assembly now, not just a DLL).
|
|
|
|
|
I'm working on an open-source project, writing a program to convert MathML (from, say, Word 2007) to C# code. I need help with coding and therefore would like to ask whether anyone is interested. Details of the project can be found here: http://www.codeplex.com/mmlsharp[^]
|
|
|
|
|
It seems you already have 2 active developers. I have been working solo on my opensource projects for more than 5 years, and never needed help (yes, time is what I do need! ).
I just downloaded the code. Is that all of it? I dont understand why you need help with coding the project. Maybe you just need to be more patient
|
|
|
|
|
Well, there are lots of really nasty tasks - some of the features I'd like to have are hell to implement. BTW, what do you mean by 'viral license'?
|
|
|
|