|
I want to insert 2 rows into my spreadsheet but I have a dataset that is inserting values into the spreadsheet and I want to insert the rows after that values from my dataset.please help thanks.
|
|
|
|
|
how to loop the label or textid in C#.net
as per vb
textboxname.text=cmd.executescalar()
but it,s not working in c#.net
anyone tell me the suggestion now
lucky
|
|
|
|
|
Lucky Sheikh wrote: how to loop the label or textid in C#.net
as per vb
textboxname.text=cmd.executescalar()
but it,s not working in c#.net
anyone tell me the suggestion now
What do you mean "loop the label or textid"?
The code you have written puts the value of the first column of the first row in the Text property of the text box. It won't loop over anything.
|
|
|
|
|
textboxname.text=cmd.executescalar()
ExecuteScalar returns object.
You assigned this object to var string so that u r getting error here
try this code
textboxname.text=cmd.executescalar().ToString();
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Imran Khan Pathan wrote: textboxname.text=cmd.executescalar().ToString();
And if the result set contains zero rows this will fail also.
|
|
|
|
|
Hi All...
I work for a software development company which writes Telephony solutions.. All of our backend components are written in C++ but the problem I am finding is it is taking us to long to get products to market and am looking for a quicker means of writting these applications.. I have been researching and toying with the idea of moving some of our newer products to C# to try and improve stability and simplicity in our applications. The only thing I am unsure about is the performance aspect and if C# can do just as much as C++ can. We use Threads, Handles and pointer list's extensivly. These applications are real-time applications and need to perform task's quickly and efficiently without delay. Maybe I am asking to much of having the best of both worlds but any advice would be appreciated..
|
|
|
|
|
A common misconception is that C# cannot work with pointers. This is not true. While it is not recommended to work directly with pointers, you can do it by marking regions of code as unsafe, so you could move highly intensive pointer based code into these areas. I would question though, whether or not this is a route you would want to go down when you can mix C++ and C# projects in the same solution.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi all,
I have a xml file of the following format.
<xml version="1.0" encoding="UTF-8">
<MainCategory>
<category1>
<title>First Title</title>
<Description>Some description</Description>
</category1>
<category2>
<title>Second Title</title>
<Description>Some description about the second category</Description>
</category2>
</<MainCategory>
</xml>
the data from the xml file is stored in a datatable and set as a datasource to datagridview.
now when a new entry is added to the top of the xml file, say like this,
<xml version="1.0" encoding="UTF-8">
<MainCategory>
<NewCategory>
<title>New Title</title>
<Description>description about new category</Description>
</NewCategory>
<category1>
<title>First Title</title>
<Description>Some description</Description>
</category1>
<category2>
<title>Second Title</title>
<Description>Some description about the second category</Description>
</category2>
</<MainCategory>
</xml>
how can i check the xml file for new changes and display the values for the new categories alone?
this xml file is not stored in the local machine. how can i accomplish the same without storing the xml file locally?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
how to insert,update and delete records in a SQL Express 2005 database using typed dataset in c#.net 2005
himanshu p.taunk
|
|
|
|
|
Hello. In Visual Studio 2005, there is a Stop method that you can call from any method to stop the service. That is useful in case something went wrong.
I see that in Visual Studio 2003, that method doesn't exist. How can I then stop the service from code?
Regards,
Diego F.
|
|
|
|
|
Hi Diego,
Although I'm not 100% sure of how to do it, hopefully this puts you in the right direction. A service can only be started or stoped by the OS (for what I understand anyways...). So to stop it you either have to use the Services management snap-in in Win2k / XP etc or the NET command from the command prompt. Stopping it from your code is probably going to be easier from the latter...
NET Stop <servicename>
Hope this helps!
Having said all the above... have a look see here... http://support.microsoft.com/kb/245230[^]
TimmyFox
|
|
|
|
|
Hi there,
I'd like a control to display my log messages for my application, apart from the simple RichTextBox idea. I was thinking something that would have a separate row for each item, something like a ListView, in that sense. The best thing I've seen is in this screenshot:
http://www.feedghost.com/Promo/ShowScreen.aspx?id=5
But, I'd like to not have all those columns---just the titles and excerpt text .
Can anyone point me toward such a control, or perhaps tell me how to bend ListView to my will?
-Domenic Denicola- [CPUA 0x1337]
“I was born human. But this was an accident of fate—a condition merely of time and place. I believe it's something we have the power to change…”
|
|
|
|
|
I find this[^] control to be very flexible/powerful when it comes to working with lists of data.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Dear all,
I'm working with a Microsoft outlook add-in. There are 2 kinds of email item. One is normal email from the internet, called SMTP email. The other is from Exchange Server, called EX email.
I want to get the sender email address when user click on a email item.With the smtp email, I can get the sender email easily. I have a big problem when user click on EX email type, an email is from Exchange Server. The SenderEmailAddress is not as usual. It is like: mail.SenderEmailAddress = "/O=ABC ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=MYTESTING"
I found one way on internet for this problem, but it is not success when i applied.
<br />
public static string GetFromAddress(MailItem mail)<br />
{<br />
MailItem objItem;<br />
MAPI.Session objSession;<br />
MAPI.Message objMsg;<br />
MAPI.AddressEntry objSender;<br />
String strAddress;<br />
String strName;<br />
String strEntryID;<br />
objOutlook = GetApplication();<br />
strName = mail.SenderName;<br />
strEntryID = mail.EntryID;<br />
objSession = new MAPI.Session();<br />
object pobjMissing = System.Reflection.Missing.Value;<br />
objSession.Logon("", "", pobjMissing, pobjMissing, pobjMissing, pobjMissing, mail.SenderEmailAddress);<br />
objMsg = (MAPI.Message)objSession.GetMessage(strEntryID, false);<br />
objSender = (MAPI.AddressEntry)objMsg.Sender;<br />
strAddress = objSender.Address.ToString();<br />
objSession.Logoff();<br />
return strAddress;<br />
<br />
<br />
}<br />
Although I have tried for 2 days, I have no any good solutions.
Please give me a hand to solve this issue.
Thanks
-- modified at 6:10 Monday 17th September, 2007
Banana
|
|
|
|
|
First thing to try:
mySenderAddress = (message.SenderName == null) ? String.Empty : message.SenderName;
Second thing to try:
mySenderAddress = ((MAPI.AddressEntry)message.Sender).Address.ToString();
____________________________________
There is no proof for this sentence.
|
|
|
|
|
Thanks for your answer, Corinna John
Could you please tell me more detail about message variable. Is it a objMsg variable in my example?
<br />
objSession.Logon("", "", pobjMissing, pobjMissing, pobjMissing, pobjMissing, mail.SenderEmailAddress);<br />
objMsg = (MAPI.Message)objSession.GetMessage(strEntryID, false);<br />
If yes, I still got the wrong email address. Its format is like "/O=ABC ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=MYTESTING"
If no, please tell me how to get that message variable.
Are there any other ways to get email address sender of email from Exchange Server without log on.
Thanks for your advance.
-- modified at 23:02 Monday 17th September, 2007
-- modified at 3:25 Wednesday 19th September, 2007
Banana
|
|
|
|
|
Your logon fails because the last parameter is wrong. You don't specify username/password, which menas to use the acount of the currently active user. The profile info parameter tell Exhange to use the sender's profile. That doesn't make much sense, does ist?
The correct call to logon as the current Outlook user is:
<br />
objSession.Logon("", "", false, false, pobjMissing, pobjMissing, pobjMissing);<br />
The rest should work after you got a session. For further information please see MSDN:
http://msdn2.microsoft.com/en-us/library/ms526377.aspx
http://support.microsoft.com/?scid=kb%3Ben-us%3B171422&x=10&y=13
And the samples at CDO Live:
http://www.cdolive.com/code.htm
____________________________________
There is no proof for this sentence.
|
|
|
|
|
Hi, i have one button1 hwo starts the timer:
Timer oT = new Timer();
oT.Tick+= new System.EventHandler(TimerFunction);
oT.Interval = 15000;
oT.Start();
private void TimerFunction(object o, EventArgs e)
{
//////////my code
}
My question is how do i stop the timer with a button2 click???
And do u know any good sleep or wait function???
Thanks!!!;);P
|
|
|
|
|
Hello,
andredani wrote: My question is how do i stop the timer with a button2 click???
You found the "Start()" method, but not the "Stop()" method.
Anyway, you could also set the Boolean "Enabled" property "true" or "false"!
andredani wrote: And do u know any good sleep or wait function???
"Thread.Sleep(timeinms)" will freeze the thread (Also GUI if it's the main thread).
Hope it helps!
All the best,
Martin
|
|
|
|
|
You can use Enabled property for System.Timer or for System.Windows.Form.Timer
andredani wrote: And do u know any good sleep or wait function???
Is it very difficult to guess that 'sleep' function is called Sleep()?
|
|
|
|
|
Giorgi Dalakishvili wrote: Is it very difficult to guess that 'sleep' function is called Sleep()?
Well, it might very well have been called "delay".
|
|
|
|
|
hi
I want to get the value of specified row and column from dataGridview e.g. value of row2 column3,is there any method of datagridview that can return me the value of cell(col#,row#) or tell me how I can get value of 1st column if user select whole row.
Regards
Shanzay
|
|
|
|
|
myDataGridView[columnnumber,rownumber].Value returns the value at the intersection of columnnumber column and rownumber row
|
|
|
|
|
You can get first row's first column value using this code
GridView1.Rows[0].Cells[1].Text
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Hey Guys,
i search a tool to configurate easily Log4Net.
Can someone help me?
Thanks
Patrick
|
|
|
|