|
Good Afternoon Mr Simmons
I Admire your work i must say.
To Answer your question, this is not a homework, when you say this has been asked twice , Am sorry i have not come across it and i certainly goggled for it before i posted.
Thank you sir for your comment
Vuyiswa Maseko
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
If you don't want to have duplicates, I suggest using a System.Collection.Generic.HashSet
If you do want duplicates, but want to know about them, you may want to wrap something around a Dictionary and have the value of the Dictionary be the number of times the key was "added".
What exactly do you want?
|
|
|
|
|
Thanks for your comment. i have already implemented them.
Thanks
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Dear,
i published my project. it creates a setup.exe file into published folder.
when i run this setup it installs the project and create a shortcut into start-Program-project->prj.exe
can any one tell me where i found the installed file in my pc?
and how i set the path for this at the time of installation?
|
|
|
|
|
ddravin2000 wrote: can any one tell me where i found the installed file in my pc?
Right Click on Exe > Properties > Click on "Find Target " Button.
You will get the application Folder Location
ddravin2000 wrote: and how i set the path for this at the time of installation?
Yes, you can set the Installation Path.
In Setup Project
1. Select "Application Folder "
2. Go To application Folder Property Windows
3. Change the DefaultLocation Property
Default Location will specify the application install location on target computer.
by default it is [ProgramFilesFolder][Manufacturer]\[ProductName]
You can configure it
Hope this will helps you.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Hi
my question is that how to insert relational data with tableAdapter. for example we have 2 tables:
Orders (Parent Table)
OrderDetails (Child Table)
now, we want to insert new Order and some OrderDetails record in Relational mode :
Insert new Order & it's OrderDetails together
Order1
OrderDetails1
OrderDetails2
OrderDetails3
Insert Operation ...
as u can see in my scenario, the OrderDetails to be inserted is DataTable, not a single record. i found this article, but indeed, my problem was no solved Because :
1. it's implement by DataAdapter and i'm using TableAdapter. i think TableAdapter has a built in functionality to do this.
2. it's a single child row, wheras in my scenario the child is DataTable.
any Help ?
Thanks
|
|
|
|
|
Hi,
I am binding data to the Combobox from the database using the DataSource,DisplayMember and ValueMember.
I want to display a default text named --Select-- at index 0 in the Combobox, apart from the values in the database. How do I achieve this? I am using DataSet.
Thanks in Advance.
|
|
|
|
|
You can add manually by using ListItem.
Create a ListItem with a corresponding value then insert it into the existing Items of the combo box..
You should do this after databindin event.
|
|
|
|
|
I do this all the time, so much so that I create a method the inserts a row at position 0 in the data table. Create a new row based on the table, populate it (relevant fields only) with your default value and use table.rows.insert.
public static DataTable TableAddRow0(DataTable oTable, int iLabelCol, string sLabel)<br />
{<br />
try<br />
{<br />
DataRow oRow = oTable.NewRow();<br />
if (oTable.Columns.Count > 1)<br />
{<br />
oRow[0] = 0;<br />
oRow[iLabelCol] = sLabel;<br />
}<br />
else<br />
oRow[0] = sLabel;<br />
<br />
oTable.Rows.InsertAt(oRow, 0);<br />
return oTable;<br />
}<br />
catch (Exception)<br />
{ throw; }<br />
}
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am using Visual Studio 2008, i am writing a small code for Net Compact Framework. I use Windows Mobile Emulator. Now my code is in Directory "c:\Works\UI\MyProj". Now when i use following command
string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
it returns \Program File\MyProj instead of "c:\Works\UI\MyProj". I want to access another folder in the same directory called Images. I use something like this
MyImage = new Bitmap(path + @"\Images\myImage.bmp");
but when i try to execute the aove statement it returns the following error
Could not find a part of the path '\Program Files\MyProj\Images\myImage.bmp'.
How do i access the Images folder in my project directory
Regards
Hiten Parmar
|
|
|
|
|
Check out the System.IO.Path class. Specifically, you may find Path.GetFullPath() and Path.Combine() useful.
If your image is located in a subdirectory in the directory of your app, you could just do
MyImage = new Bitmap("Images\myImage.bmp"); . You don't need the full path there.
|
|
|
|
|
Hi everyone,
Iv'e created small application that sends files to a server using ftp.
I got 2 network adapters on my machine.
when i monitoring the communication i see that each time a different network adapter is sending the package.
My question is can i select which network adapter to use in the code level (if yes how) or it should be a netwok setting.
thanks in advanced
|
|
|
|
|
Hi
I had an application of BHO. It had been developed using visual Studio 2005. Actually, it main aim is to read the text of HTML page and write that into a text file. I had checked this on IE6 and IE7 in various PC's. before that I had installed .Net Framework 2.0 also. If I register that dll in some pc's it works perfectly on both IE6 and IE7. but on some PC's it doesn't write the html page's text into a file? what may be the problem?
How on earth can I figure out why there is a difference? I have compared tools>internet options>advanced. The settings on both computers are identical. They also both have all 4 security zones at the same level and they both have the same general settings.
modified on Monday, April 20, 2009 1:24 AM
|
|
|
|
|
hello
VBA calling C# code anyone? I'm looking for an article/tutorial.
Thanks
dev
|
|
|
|
|
|
Thanks - seen better ways to do this (than wrapping it in COM/ATL server) now with Excel 2008?
I remember I done ATL server way back don't like this. You've got to marshall data into BSTR and all that (even thrown out the book now), just don't like the mechanism.
For example, this looks about right: http://www.c-sharpcorner.com/UploadFile/jodonnell/Excel2003fromCSharp12022005021735AM/Excel2003fromCSharp.aspx[^]
This article shows you how to generate Excel doc with C#, setting cell value via Excel object model and all. But still to call say C# component/dll from Excel VBA code... seems like COM is the only way?
But
dev
|
|
|
|
|
COM isn't ideal, but I don't know any other options unfortunatly. The example you posted seems to be about replacing VBA in Excell with C#. I doubt that you're looking for Excell-automation-article's, so that's not going to help either.
Seems COM is the way to go, sorry
I are troll
|
|
|
|
|
haha - COM is still alive afterall.
dev
|
|
|
|
|
Eddy Vluggen wrote: COM isn't ideal, but I don't know any other options unfortunatly.
Neither do I, and I've looked in the past. On the plus side as long as you keep your types within the allowed values on the .net side (this doesn't cause any sort of compile time error, the method's just not exposed in COM) all you really have to do is to tell the compiler to make it a com class. From proof of concept testing, it's reasonably painless.
Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall
|
|
|
|
|
How can perform following conversion (string to datetime)?
string s="January 1, 1986" to DateTime datatype
shahdat
|
|
|
|
|
string s = "January 1, 1986";
DateTime dt;
if (!DateTime.TryParse(s, out dt))
else
|
|
|
|
|
Dude try this
String s = "January 1, 1986";
DateTime t1 = DateTime.ParseExact(s, "MMMM d, yyyy", null);
|
|
|
|
|
Dear all,
I have a procedure that works nice I guess.
Exm-
CREATE PROCEDURE Insert_TeacherProfile
(@Ins_ID int, @Yr smallint, @Querter int, @Tcr_ID smallint, @Tcr_Nm nvarchar,
@Gender smallint)
AS
INSERT INTO TeacherProfile
(Ins_ID, Yr, Querter, Tcr_ID, Tcr_Nm, Gender)
VALUES
(@Ins_ID, @Yr, @Querter, @Tcr_ID, @Tcr_Nm, @Gender)
Now you can see the all field not allaw null except Gender(allaw null) field. But In the software when I pass no (null) value in Gender filed it show error. Anyway to pass null value in this query. I need two option, value or null anything I can be inserted. Is there anyway to do it inside this procedure?
If you dont understand tell me.
Thanks
|
|
|
|
|
WE have a SQL forum, but if you want to be able to pass null in then use isnull to change the nulls to a default value.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
sorry I ve done mistake for posting in this section.
But my default is null also.
Thank you
|
|
|
|