|
This does not work. I don't think that mailto supports attachments. Any other ideas?
cobra2005
|
|
|
|
|
google for mailto attachments
|
|
|
|
|
hi. is there maximum value of build number of assemblyinfo version?
|
|
|
|
|
Don't know 100% for sure but I'm guessing
<br />
string maxVersion = String.Format("{0}.{0}.{0}.{0}", Int32.MaxValue);<br />
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
|
Hello ,
I made a programes that use com+ componect to do stuff in the database server and i used crystall report to print my reports but i have a exceptions when i am trying to retrive database with com+ component and disply it with the crystall report.
"The transaction has already been implicitly or explicitly committed or aborted"
and this exception when i try to display the crystall report.
"The table 'Client_report' could not be found.
Error in File D:\DOCUME~1\ADMINI~1.000\LOCALS~1\Temp\{A6BF13A2-994F-4A36-9312-40488E7885C3}.rpt:
The table could not be found. ---> System.Runtime.InteropServices.COMException (0x800002C5): The table 'Payroll_Report' could not be found.
Error in File D:\DOCUME~1\ADMINI~1.000\LOCALS~1\Temp\{A6BF13A2-994F-4A36-9312-40488E7885C3}.rpt:
The table could not be found."
-- modified at 7:16 Friday 16th December, 2005
Please help
Thanks
Hoho
|
|
|
|
|
Hello,
I need your help,i want to run my application in system tray like volume control etc:.the tool i am using is c#.net.pls help me to find a solution immediately.
thanks in advance help me.
alex.
|
|
|
|
|
|
Hi friends,
I have displayed the schema of the excel file ...
Depending upon the datatype being displayed for each field ,i need to write the entire excel file as textfile specifying the text qualifiers for appropriate columns...ie,"" for strings ,# # for Date and some other special fields like Date,WebAddress,DateTime,Currency etc....
How can do it?
Kindly help me
|
|
|
|
|
Hi all,
I have an object collection which i want to sort on the basis of one of its attributes.
If i store it in hashtable and do custom sorting, the hashtable re-sorts it on the basis of key values, so I am left with the unsorted collection again.
any suggestions from anyone are welcome.
Thanks
|
|
|
|
|
I don't think Hashtables can be sorted. You might want to check out the SortedList class.
|
|
|
|
|
The SortedList sorts the Item on the basis of the keys. But I dont want to sort the items on the basis of keys in the sortedList. I want to sort the items on the basis of some property in the object added in the list.Also I cant make that property the key value of the sorted list because it can have duplicate values.
What should I do.
Thanks.
|
|
|
|
|
In that case, other than creating a class specifically for this task, the simplest option might be to store the data in a DataTable and set the sort on the DefaultView.
|
|
|
|
|
Hello i have a question, can i convert an array of bytes to a my structure and vice versa? Thanx
|
|
|
|
|
peppepinna wrote: Hello i have a question, can i convert an array of bytes to a my structure and vice versa? Thanx
Yes, you can. For example:
byte[] ba =
YourStuct ys = new YourStuct();
using(MemoryStream ms = new MemoryStream(ba))
{
BinaryReader br = new BinaryReader(ms);
ys.SomeField = br.ReadByte();
ys.SomeOtherField = br.ReadInt32();
br.Close();
}
|
|
|
|
|
As the subject says, how do i count the number of rows with sqldatareader ?
|
|
|
|
|
Return the @@ROWCOUNT from the query as an output parameter
|
|
|
|
|
I new to C# and mssql. this is my code:
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
SqlDataReader rdr = null;
conn.Open();
SqlCommand cmd = new SqlCommand("SELECT count(*) FROM training WHERE userid='genbox'", conn);
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
Response.Write(#WANT COUNTER HERE#);
}
rdr.Close();
conn.Close();
I figured that something like SELECT count(*) FROM... could be used, but if @@ROWCOUNT is better, i will use that instead.
|
|
|
|
|
Oh, ok two ways - both exactly the same, but one is a tonne more readable.
You are returning the count as the first column in a select list so you can just go:
while (rdr.Read())<br />
{<br />
Response.Write(rdr[0].ToString());
}
However, you can make this much more readable by aliasing the column as a name
SqlCommand cmd = new SqlCommand("SELECT count(*) AS TrainingCount FROM training WHERE userid='genbox'", conn);
now:
while (rdr.Read())<br />
{<br />
Response.Write(rdr["TrainingCount"].ToString());
}
HTH!
-- modified at 7:22 Friday 16th December, 2005
|
|
|
|
|
Thanks, it sort of works. :S
Cant i use the same SqlCommand to extract data from the tabel ?
if i exec this:
while (rdr.Read())
{
Response.Write(rdr["TrainingCount"].ToString());
}
then it returns the number of rows like it should, but if i read any data from the table, then it returns an error. - this is the code:
while (rdr.Read())
{
Response.Write(rdr["TrainingCount"].ToString());
Response.Write(rdr[1]);
}
And this is the error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
Do i really have to make 2 SqlCommands, one that counts and one that i can get data from? that dosent seem right to me.
|
|
|
|
|
Does anyone know of a tool (preferably free) to determine the location of boxing/unboxing within a project.
The aim is to improve performance and justify all boxing operations.
Thanks
LiamD
|
|
|
|
|
You could use ildasm.exe from the .NET Framework SDK to disassemble the assembly to IL and search for "box" and "unbox". But if you're aim is to determine how ths impacts performance you should use a code profiler. There are many already available for the .NET Framework - both free and commercial - and they aren't too terribly difficult to write if you'd rather do that.
The CLR Profiler for the .NET Framework 2.0[^] is one developed at Microsoft and is used in a lot of MSDN articles as wellas in blogs like Rico Mariani's[^], who's responsible for performance in the Developer Division. Not only will it help you determine where boxing is performed but also how often and how much impact is has on your application's performance.
Also remember that any time you treat a number, struct, or enumeration as a reference type (anything that derives from System.ValueType ) boxing will occur. This is one of many great reasons for generics (similar to C++ templates) in the .NET Framework, so that you can avoid boxing like so:
ArrayList list = new ArrayList();
list.Add(1);
list.Add(2);
list.Add(3);
List<int> list = new List<int>();
list.Add(1);
list.Add(2);
list.Add(3);
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
hi
I need free C# 2005 ebook.
Can give me link(s) to it, please?
Best wishes
|
|
|
|
|
|
Yup no better book than MSDN itself....
Bikash Rai
|
|
|
|