|
|
You're welcome.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
I'm using reflection to grab the type
propertyCaller.PropertyType.GetType()
I get this errpr "a value of integral type expected."
what gives? and why a integer type
|
|
|
|
|
what properties do I set if I have a class like
public class MyClass : CollectionBase, IBindingList, ITypedList, and a few more I cant remember
how od i do it?
|
|
|
|
|
Just started to read up on ADO.NET. Do I understand this correctly:
Normally, when I code a C++ app I open a connection or two when I first start my app. I keep the connection open until my app is closed. I would created and destroy command objects many times during the life of the app.
With ADO.NET am I supposed to call Close on the Connection after EVERY time I get done using it? - - Because there is a connection pool that it is returned too.
|
|
|
|
|
Yep, that is pretty much it. I think the connection pooling is more for ASP.NET but also think that when you are holding on to a connection, that is one more connection license being used on the server. If you happen to run against MSDE, there are only five I believe before it throttles down.
You have to use planning though, as there is an time overhead in establishing those connections depending on where the server is located.
Rocky Moore <><
|
|
|
|
|
I'm creating an exception manager for my application. When an unhandled application exception occurs the class needs to be able to send the report back to the company. I know about the System.Web.Mail namespace, but it looks like an smpt server is required, and it seems like win2k is also required. How can I send an email and have it work even on win98 without specifying an smpt server. Does the .net framework have a class that will send an email with its own smpt server.
|
|
|
|
|
AK wrote:
it work even on win95
You are asking the wrong group, .NET is not supported on Win95. You will have to choose another programming langauge.
Rocky Moore <><
|
|
|
|
|
I didn't know that .net framework didn't work on 95. I really don't care, as long as the majority of the windows users have support.
Anyway. Does the .net framework have a class that would send email with it's own smpt server?
|
|
|
|
|
You can use the built in routines or search CP for "SMTP C#", there are several aritcles with different methods.
Rocky Moore <><
|
|
|
|
|
.NET does have an SMTP server - nor should it. That's really not a "base class library" sort of thing. Windows Option Pack 4 introduced the SMTP services which provides CDO. The System.Web.Mail namespace has classes to use this (and doesn't have to be used from the Web, BTW), but the .NET class library doesn't.
The other poster is right - you can use sockets to do this, but it's not really a decent SMTP server unless you support more functionality. Hey, sounds like a great idea for a CP project! Good luck!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
What you are actually looking for is a SMTP client that will post your messages to a SMTP server at the destination server.
Actually, a good source for you could be at:
http://www.lumisoft.ee/lsWWW/ENG/index_eng.aspx?type=products[^]
Check out the e-mail server. It has full source code and you can probably strip out some client code to send your e-mails without the need of a SMTP server.
I have seen other code, but not sure where at the moment. I have been using the Lumisoft e-mail server (with a few modifications) for more than a year. He has done a great service for the .NET world providing a full SMTP/POP3 server that supports MIME and now authentication.
Rocky Moore <><
|
|
|
|
|
I'm developing a remote control software and would like to know if it's possible to compare between two images to check and see if they are the same image. For example, if i am idle while using the remote control software, the remote PC image would be the same at all times (until there are change on screen such as mouse movements, time updates (clock @ statusbar), etc).
If there's an alternative way or any suggestions, i'd be glad to hear it. The reason why i'm doing this is to prevent the server from sending the same image (screenshot) every time regardless of whether the user (on the client side) is idle or using the remote pc.
|
|
|
|
|
I would have thought the overhead in doing the comparison would be prohibitive.
This should be event based so that a new screen is only sent to the client when something happens that then need to be aware of.
If you really must do the comparison, its pretty easy to convert an image into a memorystream and then into an array where you could do a byte by byte comparison.
|
|
|
|
|
You could take a checksum of the image on both sides and compare the checksum.
|
|
|
|
|
somebody can help me , how to get all param in store procedure
ex : myStore(@param1, @pram2, @pram3,...)
and I want that
index name
1 @param1
2 @param2
3 @param3
....
thanks!!!
Nho'c ti`
|
|
|
|
|
sqlCOmmand.Parameters.Add("@param1", SqlDbType.Varchar,200);
sqlCOmmand.Parmaters["@param1"].Value = 1;
|
|
|
|
|
No, I want get name param of myStore
ex : Store Procedure myStore(@param1, @param2,...)
in this store : @param1, @param2 I don't know that name and I want get name of all param in this store
Nho'c ti`
|
|
|
|
|
You can use sp_procedure_params_rowset 'your_procedurename_here' .
It returns a rowset containing the names, types and other info on the parameters that you procedure takes.
This is the SP that is used by MS in their Data Access Application Blocks (DAAB) for .NET and in earlier versions of ADO.
|
|
|
|
|
I has use your code but it return 0 row effect althought my store have 4 params
can you show me your code??
thanks
Nho'c ti`
|
|
|
|
|
Copy this into a C# Console application:
<br />
SqlConnection cn = new SqlConnection("some_valid_connectionstring_here");<br />
SqlCommand cmd = new SqlCommand("sp_procedure_params_rowset 'your_stored_procedure_name_here'", cn);<br />
SqlDataAdapter da = new SqlDataAdapter(cmd);<br />
DataTable table = new DataTable();<br />
da.Fill(table);<br />
<br />
foreach(DataRow row in table.Rows)<br />
{<br />
Console.WriteLine("{0}", row[3]);<br />
}<br />
"It works on my machine..."
|
|
|
|
|
I dont see why becuase the name has to match the store procedure parameters but
SqlParameter sqlPar;
foreach sqlPar in mySqlCommand.Parameters
{
Debug.WriteLine(sqlPar.ParameterName);
}
|
|
|
|
|
I'd try same your code Ista, but it didn't work
thanks Einbu with your idea
|
|
|
|
|
foreach( SqlParameter p in sqlGet.Parameters)
{
Debug.WriteLine("The name is " + p.ParameterName);
}
Well obviously from the compiler kick backs it says it must be declared and have a parentheses. so if you modify my code it works just fine.
I even included another code snippet for you:
Debug.WriteLine("The name is " + sqlGet.Parameters[0].ParameterName );
Sorry about the misprint but I havent been using the foreach a whole bunch
|
|
|
|
|
Is there any way to have the font color set by a rule? For example if the value in a cell is negative I would like it to be displayed as red. (It would be cool to set this rule on the column.) Can this be done?
|
|
|
|