|
Help!
I still have made no progress in figuring out how to do this...
Thanks,
Chris
|
|
|
|
|
The last time I downloaded the beta version of C# it was beta 2.
The opening screen always says "Cannot find server " . Just like I was offline.
Beta 1 , never did that.
Am I alone here ? or is this what everyone is getting from Microsoft ?
I'd like it to function correctly, even the toolbox shows nothing in it.
I tried a complete erase and re-download twice, I get the same results every time.
Is this a bug, in the download ?
By now that should have been resolved, if that was a problem.
Ron U:
Happy Trails .
|
|
|
|
|
|
I have used a mschart component in my form,
but I have no idea how to use the my customised image to replace the background color of bars.
Thanks
|
|
|
|
|
I made a chat program that displays the text in a listbox. When I created a thread to handle the received data, I found out (using the debugger) that a lot of controls of the form were inaccesible from the thread! However, all was OK with the main thread.
Whats wrong?
Thanks
|
|
|
|
|
You cannot directly access controls from a thread different than the one that created the controls. Look up the help on Control.Invoke for more info on how to interact with the UI thread from other threads
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
You cannot access UI controls across threads. This[^] article might help you understand why.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks very much, guys. Especially you, Senthil. Very useful article, it saved me a lot of wall headbanging .
|
|
|
|
|
How to know if the e-mail massage sent via SMTP is really sent.
I used System.Web.Mail namespace (SmtpMail.Send method)
mail.BodyFormat=MailFormat.Html;
mail.Body="UtilMailMessage001 - success";
mail.Subject="Vlada ";
mail.From="Nikola";
mail.To= "nikolami@beotel.yu";
System.Web.Mail.SmtpMail.Send(mail);
The mail massage is sent, but when I'm disconnected I don't get any error massage or exception. I would like to see confirmation if the mail is properly sent. How tp do that?
The described application is simple windows application (not ASP.NET).
|
|
|
|
|
hi nikola,
try this one out...
if(System.Web.Mail.Send(mail))
MessageBox.Show("Message Sent... ");
else
MessageBox.Show("Message Not Sent... ");
the logic should work for both windows and web application. for web application since messagebox does not work, you could either use a label (label1.text) or textbox (textbox1.text) instead of messagebox.
failure can only inspire me...
|
|
|
|
|
I have created a Stored Procedure and I am trying to insert in to tables using the stored procedure by passin parameters from the GUI.
My problem is, Stored procedure works fine if I use SqlCommand object. But now I am using OdbcCommand object which is creaing issue whenever I try to insert using the SP's. The error I get when I use OdbcCommand object is "There is no paramter supplied for @PRDD_CustomerICA" which incidentally is the first parameter that I am passing. Parameter Order in SP and frontend code is also similar. Using SqlCommand object works fine which indicates that SP is fine.
I am coping a part of my code with few parameters that I am passing to the SP. Could anyone please let me knw what I am missing? Is there something extra required to do for OdbcCommand object?
bool blnInserted = true;
OdbcTransaction tran = con.BeginTransaction();
OdbcCommand cmd = new OdbcCommand("InsertNewShipment", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@PRDD_CustomerICA", txtBillICA.Text.Trim());
cmd.Parameters.Add("@PRDD_ProductID", intProdID);
cmd.Parameters.Add("@AST_Refnr", txtRef.Text.Trim());
cmd.Parameters.Add("@AST_DefID", intAstDefID);
cmd.Parameters.Add("@AST_StatusID", intShipStatus2ID);
cmd.Parameters.Add("@AST_ICA", txtBillICA.Text.Trim());
cmd.Parameters.Add("@AST_RegionID", intRegID);
cmd.Parameters.Add("@AST_Billable", intBillable);
cmd.Parameters.Add("@AST_ExpirationDate", dtpLicFileExpDate.Value);
cmd.Parameters.Add("@AST_Comments", txtShippingComments.Text.Trim());
cmd.Transaction = tran;
cmd.ExecuteNonQuery();
if(blnInserted == true)
{
tran.Commit();
}
This forum has helped me a lot and I hope I will get an answer soon.
Thanks a lot in advance
|
|
|
|
|
Also I read in MSDN that Parameters for queries involving OleDbCommand and OdbcCommand objects use question marks; queries that use SqlCommand objects use named parameters that begin with an @ symbol.
So I have to use ? instead of @...
I guess I got the solution. If I am wrong please let me know.
Thanks
|
|
|
|
|
The ? marks are used as the replacement characters in the text of a query. They do not apply to stored procedures. The order of the parameters in the collection should however, match the order expected by the stored procedure.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
The opposite of the religious fanatic is not the fanatical atheist but the gentle cynic who cares not whether there is a god or not.
Eric Hoffer
|
|
|
|
|
|
hello
i am developing AI chess engine for this purpose i want basic chess programming code in c# i am new in c# so thats why i want help please any one of u can send me C# code or help me in development.
thanks.
|
|
|
|
|
|
Both of those are UI for chess engines. This guy was hoping to find some chess engine written in C#.
Alex Korchemniy
|
|
|
|
|
|
Alex Korchemniy wrote:
Both of those are UI for chess engines.
Are they? You are right about the second one, but Valil.Chess contains port of Java chess engine... or at least that's what article say, but I admit I didn't look at the code. Why would author say something what isn't true.. I assume that engine IS there.
David
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
I'm trying to work with combo box, which will display graphically data I store in access DB. Each index no. has a column in the DB. means: choose option with index 1 from drop down list; get data & graph for column 1. Very simple & strait forward. I just cannot seem to grasp the idea of this combo box & what's running it. What is the event which will trigger the change of display? How do I pass item index no. to the method that connected to DB?
You may send me a link to a site where I can view some simple examples of those? I've been looking all over & couldn't find something useful.
sea#
|
|
|
|
|
--------------------------------------------------------------------------
I have a NET problem
In java I ahave made a NetCalculator bla bla and I needed a method
like this one:
public byte [] getBytes ()
{
return InetAddress.getByName(this.ip).getAddress();
}
Now I want to port this in C# all fine but I need to return the
"byte[]" the ".getAddress();" does this but in C# tthe
public byte [] getBytes ()
{
return Dns.GetHostByName(this.ip).AddressList;
}
Returns something else...
How can I convert this to c#?
THX...
--------------------------------------------------------------------------
How About this?How can I convert this java code to c#
public static String nsLookup(String nsl)
{
String nslookup;
InetAddress address = null;
try
{
/* // Get hostname
address = InetAddress.getByName(nsl);
nslookup = address.getHostName();
*/
nslookup = Address.getHostName(InetAddress.getByName(nsl));
}
catch (Exception uhe)
{
nslookup = "unknown";
}
return nslookup;
}
--------------------------------------------------------------------------
(o)(o)
|
|
|
|
|
Hello,
I have developed two versions of an application, with one of them using regular expressions. It's code is much more clear and maintainable, but the problem is the program runs slower. I know there are some rules in building efficient expressions, but I don't have too much expirience using regex. Could you please provide some tips?
Thanks
|
|
|
|
|
Show us the regular expressions and maybe someone can point out some of your inefficiencies. Btw, if you have .* in there then chances are it's gonna be extremely inefficient.
Regards,
Brian Dela
Blog^
Co-author of The Outlook Answer Book... Go on, pre-order^ it today!
Regular Expression Library builder^
|
|
|
|
|
Hi,
create\s+(procedure|function)\s+[\w_\.-]*\s*\(.+\n*\)(.*\n)*?begin(?<fid>(.*\n)+?)end
With this expression I'm trying to retrive the body of a stored procedure. I don't see how to avoid the .* and .+ . Any advices?
Regards
|
|
|
|
|
You can replace all your .*\n with [^\n]* which is the same but more efficient... plus, if you had singleline mode turned on your regex would probably break as it is (or it might be more efficient ith a little tweaking ... depending on what area you are trying to capture. I'd also replace the .+\n with [^\n]+ and you should use named captures and turn on explicit capturing... that should speed up your regex a lot.
Post a few examples of what you want to match and I'll see what I can come up with.
Regards,
Brian Dela
Blog^
Co-author of The Outlook Answer Book... Go on, pre-order^ it today!
Regular Expression Library builder^
|
|
|
|