|
I've written a windows application that is periodically verifying the Inbox folder from Microsoft Outloox ( within an interval of 60 secounds ). This application is working and it does exactly what it has to do.
The problem is that the same code putted in a windows service ( the declaration and initialisation of the Outlook Objects are the same in both cases ) seems not to be working, because the Outlook Object is not initialising corectly.
At the time of initialisation only it throws and COM exception.
So..were i go wrong? I will apreciate any advice.
P.S. I've tried to put the collecting function in a Class Library (DLL),and it's still not working.
|
|
|
|
|
try this link
http://support.microsoft.com/kb/237913
hope this will help you
na
|
|
|
|
|
Hi,
I have developed an application that inserts lots of data from a spreadsheet to a database. I would like to create a report (in notepad or anything) that states how many records were successfully inserted, failed, etc.
Can anyone assist me accomplish this?
Regards
Mvelo Walaza
Developer
Telkom SA
modified on Monday, November 17, 2008 6:59 AM
|
|
|
|
|
can you please tell us which database you are using.
na
|
|
|
|
|
I am using Oracle.
Toad for Oracle Version 9.0.1
Mvelo Walaza
Developer
Telkom SA
|
|
|
|
|
How can i connnect a home phone to a C#.net application sach that the application can answer the phone automatically and can send a call automatically
|
|
|
|
|
You're going to need cabling, and a whole hunka code.
|
|
|
|
|
Hi.
I need help with this thing.
I have a code in a form and the code has something like this:
CODE
CODE
CODE
SHOW some a new form and WAIT!! for the user to enter data
CONTINUE WITH THE CODE WHEN THE DATA IS ENTERED/SELECTED
CODE
CODE
CODE
..
..
Ok, i solved this with show dialog, but then the dialog gets full priority and the user CANT read and see data in the background-main form (it freezes or something).
How can this be solved with just Form.Show() and not with showdialog and the code after the request for show form to wait for data to be entered in the other form.
Thanks in advance.
Regards,
Matjaž
Força Barça!
|
|
|
|
|
|
No,this is not it or its just me and not knowing how to find an anwser from that good article.
Let me explain this one more time...
Yes, it should be checked between two forms, but the code should be paused until the user enters data. But the main form should be also avaliable for him to operate, move and view whats in it (as with dialog, this form is paused totaly and u cannot read something from it - frozen).
Any other suggestions?
PS: im a newbie, so i dont understand advanced classes and methods of C# :/
Força Barça!
|
|
|
|
|
First of all, if you can't understand how to use the article I posted, it's not a good thing to vote someone's post 1.
Secondly, you should structure your app like this:
somemethos()
{
//Do some stuff
subscribe to the form's event which is triggered when data in form2 changes
show the form2 here using Show()
//no more code after calling show.
}
eventhandlertodatachange()
{
//This is the eventhanlder you subscribed to
//Run the code you need here.
}
|
|
|
|
|
Great. This will work.
Im sorry about that, but didnt know really what that does so it was the first time i clicked it.
The second answer is more understandable to me.
Thank you for taking your time and helping me... now im back to work.
Regards,
Matjaž
Força Barça!
|
|
|
|
|
Glad to help you. Please reply if you need more help
|
|
|
|
|
Hmmm ok ... went back to work on my project and yet again, i stopped. Maybe its just one of those days when ive got a block in my head to think straight or something... (yeah, the weather is bad and weird) but still didnt find the solution.
I googled some more and found something with AsyncCallback, which could be also a solution to my problem and i saw in your signature that u've made an article about using Asynchronus registry notification...
If youve got some knowladge about it... can you please, write a small sample for me with two forms using async or anything else? I know im asking a lot and i know your time is prescious as everyones else, so if you dont want to... no problem. There is no fire burning and theres no rush. If i just wont find a solution, i'll drop this project.
Main has button and a lable. The form2 has textbox and a button.
on main the user would get prompted with something like ShowDialog (pause the code but not freeze the main window) after clicking ona a button, with the form2 to enter data.
the main would not freeze but the code after the row, which would prompt him with form2, would simply pause, until the user would enter data and exit in the same action of buttonclick.
complicated, i know.
Regards,
Matjaž
Força Barça!
|
|
|
|
|
You can subscribe to FormClosed event of the form2 before showing it to get notified when it is closed.
|
|
|
|
|
but wouldnt that still make the code on the main form to continue? i need a loop to keep checking... or not? i guess im stupid lol.
Força Barça!
|
|
|
|
|
So, No pause then and keeping the main form alive?
Força Barça!
|
|
|
|
|
hii
i m generating xml string in my application and want to show this in web browser control.
If i want to show xml file it shows by using
webBrowser1.Navigate(Application.StartupPath + "\\success.xml", false);
but what to do in case of XML string
please help
thanks in advance
|
|
|
|
|
Hi EveryOne,
I m developing a website into c# and i have a html page and i want to create the image of that page so from where i have to start for this which classes i have to use into .net. pls send me any link regarding this as fast as possible thanks a lot.
Hiren Dave
|
|
|
|
|
It is the first time for me to try to publish my project within VC#2005.
after it is published, after I instelled on my own computer, when I run the .exe, it gives the
error message: some .txt files (this files are used by the prject) can note be found. I don't know how to solve this problem.
in which way, these files using by the project can be found.
|
|
|
|
|
I Assume you have created a Windows App, now if you want to create an exe for your Aplication, is good if you create a Setup Project, Did you do that or am missing the point?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
you are right, I did everything you said. I have setup project, and also I can installed it.
everything is fine except some .txt files can not be found.
|
|
|
|
|
Can i get a logic of your Application, Do you Write to a File or what do you do? Because when you create an Empty Setup Project , it has nothing on the File System. If you are for example Writting to a Textfile and you did not include it in your Setup Project, dont expect to get it in the Destination Computer, make sure that all the Files that are needed by your Program to run are in one Place and they are all included in the SetupProject, if you have an external file, Right Click on the Setup Project and select FileSystem and you will fine the Application Folder , Right Click on it and Add the Files that your App will need to run in the Destination Computer.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi mate,
I had the same problem when I first started using Visual C# 2008 Express Edition. I created a project that required 3 text files on the users computer. But, what I didn't know was that in order for those files to exist on the users computer, you need to either ijnclude them into the project as resources, or add the text files to the installation package. I hope this helps.
Regards,
j.t.
j.t.
|
|
|
|
|
Hi there,
When I use the following code below I get and error called , "concurrency violation" and the database is not updated.
I am able to connect and retrieve data. but I cannot update the data from the datatable of dataset.
I am new to datagridview and datasets.
I am using Mysql 5.0 and Mysql connector .NET 5.1.2
I read many articles on updating the dataset and almost tried everything , but It does not work, I can update to Mysql database using update commands. But I want to use Dataset or dataadapter update to make it more simpler.
public partial class Form1 : Form
{
DataSet ds = new DataSet();
MySqlDataAdapter da;
DataTable dt = new DataTable();
string tabname;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
CreateMySqlCommand();
}
// Connecting to db and filling the datagridview with data.
public void CreateMySqlCommand()
{
MySqlConnection myConnection = new MySqlConnection("Persist Security
Info=False;userid=root;password=XXXX;database=test;server=terrain");
myConnection.Open();
MySqlTransaction myTrans = myConnection.BeginTransaction();
string mySelectQuery = "SELECT * FROM patient_master";
MySqlCommand myCommand = new MySqlCommand(mySelectQuery,
myConnection,myTrans);
da = new MySqlDataAdapter(mySelectQuery ,myConnection) ;
MySqlCommandBuilder cmdBldr = new MySqlCommandBuilder(da);
da.Fill(ds);
dt = ds.Tables[0];
DataRow row;
row = dt.Rows[0];
int lirow = dt.Rows.Count;
string mrno = row["MRNO"].ToString();
string patname = row["GIVEN_NAME"].ToString();
dataGridView1.DataSource = ds;
dataGridView1.DataMember = ds.Tables[0].ToString();
tabname = dt.TableName;
int y = 0;
foreach (DataGridViewRow ro in dataGridView1.Rows)
{
if (y % 2 == 0)
ro.DefaultCellStyle.BackColor = Color.Red;
y++;
}
}
// code on the button to update the datadapter
private void button1_Click(object sender, EventArgs e)
{
da.Update(ds, tabname);
}
}
}
|
|
|
|