|
Maybe YOU have a problem with doing this, but the rest of use professional developers don't. YES, you can have multiple connection strings in a .NET app and use them all at the same time. What you said was completely wrong on every level.
|
|
|
|
|
Dear Sir.,
I am use C# vs2012 to read outlook 2010's pst message
which text message as below
======================================
Mobile Position Report
Pacific Region, ID : 18449, Number : 195
Position : 2 09.72' N, 176 14.08' E
Speed : 0.0 knots, head : 93 degree
======================================
How can I read this field value and make it become one row's csv file and record??
|
|
|
|
|
If you can read the PST data, then surely all you need to do is convert it to CSV - which is simple enough manually or you could use an existing class: C# CSV Reader and Writer[^]
If that doesn't help, then you probably need to be clearer on exactly what your problem is.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
The question also include.
read exact field value in body message and put into csv file.
|
|
|
|
|
Yes, but which bit is giving you difficulty - your question says you can read the PST data, so presumably you can extract the separate fields? So what help do you need? Remember we can't see your screen, or access your HDD - we only get exactly what you tell us.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
I have copy this from Microsoft "http://support.microsoft.com/kb/310258/zh-tw"
And I still cannot get my outlook message.
=================================================
using System;
using System.Reflection; // to use Missing.Value
//TO DO: If you use the Microsoft Outlook 11.0 Object Library, uncomment the following line.
//using Outlook = Microsoft.Office.Interop.Outlook;
namespace ConsoleApplication1
{
public class Class1
{
public static int Main(string[] args)
{
try
{
// Create the Outlook application.
// in-line initialization
Outlook.Application oApp = new Outlook.Application();
// Get the MAPI namespace.
Outlook.NameSpace oNS = oApp.GetNamespace("mapi");
// Log on by using the default profile or existing session (no dialog box).
oNS.Logon(Missing.Value, Missing.Value, false, true);
// Alternate logon method that uses a specific profile name.
// TODO: If you use this logon method, specify the correct profile name
// and comment the previous Logon line.
//oNS.Logon("profilename",Missing.Value,false,true);
//Get the Inbox folder.
Outlook.MAPIFolder oInbox = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
//Get the Items collection in the Inbox folder.
Outlook.Items oItems = oInbox.Items;
// Get the first message.
// Because the Items folder may contain different item types,
// use explicit typecasting with the assignment.
Outlook.MailItem oMsg = (Outlook.MailItem)oItems.GetFirst();
//Output some common properties.
Console.WriteLine(oMsg.Subject);
Console.WriteLine(oMsg.SenderName);
Console.WriteLine(oMsg.ReceivedTime);
Console.WriteLine(oMsg.Body);
//Check for attachments.
int AttachCnt = oMsg.Attachments.Count;
Console.WriteLine("Attachments: " + AttachCnt.ToString());
//TO DO: If you use the Microsoft Outlook 10.0 Object Library, uncomment the following lines.
/*if (AttachCnt > 0)
{
for (int i = 1; i <= AttachCnt; i++)
Console.WriteLine(i.ToString() + "-" + oMsg.Attachments.Item(i).DisplayName);
}*/
//TO DO: If you use the Microsoft Outlook 11.0 Object Library, uncomment the following lines.
/*if (AttachCnt > 0)
{
for (int i = 1; i <= AttachCnt; i++)
Console.WriteLine(i.ToString() + "-" + oMsg.Attachments[i].DisplayName);
}*/
//Display the message.
oMsg.Display(true); //modal
//Log off.
oNS.Logoff();
//Explicitly release objects.
oMsg = null;
oItems = null;
oInbox = null;
oNS = null;
oApp = null;
}
//Error handler.
catch (Exception e)
{
Console.WriteLine("{0} Exception caught: ", e);
}
// Return value.
return 0;
}
}
}
|
|
|
|
|
hi , i am a beginner.i want to make a dll file and link it with an exe.the dll files should have functions and exe file should call and run those functions.but i dont know how.this may help me a lot.please correct me if i am going in wrong way.i am using visual c# express 2010
|
|
|
|
|
Unless you have a good reason for having a DLL, it is much easier just to create an executable, in order to get used to the structure of a program and how it fits together. Once you have all your code working then you can always separate parts out into a DLL if necessary. However, remember that a DLL is only any use if it is likely to be shared by multiple applications.
Use the best guess
|
|
|
|
|
Richard MacCutchan wrote: However, remember that a DLL is only any use if it is likely to be shared by multiple applications.
I'd be prepared to argue against that point!
I often use a single EXE and separate DLLs to hold the different assemblies of a project: DL and BL for example, or to separate logical segments to reduce any "accidental" interactions. The EXE is just the final PL as far as I am concerned, with even the user controls that make up the UI separated out into a different DLL (and assembly)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
And I would agree with you. But OP is a beginner so it is probably not useful to get into DLLs until he/she has a good understanding and skill level with the basics.
Use the best guess
|
|
|
|
|
no not like ur wrong guess.i m
|
|
|
|
|
Use the best guess
|
|
|
|
|
It's pretty easy - or at least it is in the Pro version of VS210, I don't have the Express version. So if any of this doesn't work, let me know...
Open your solution, and look at the Solution Explorer pane.
Right click your solution name, and select "Add...New Project..." from the drop down list.
In the dialog, Select "Class Library" from the middle panel, and give it a sensible Name. Press OK.
Build your solution.
Now, open your EXE project in the Solution Explorer pane, and right click the "References" branch.
Select the "Add Reference..." option.
In the dialog the appears, select the "Projects" tab from the list on the left, then select your new DLL project on the right.
Press the "Add" button.
Done! You can now use classes in the DLL project in your EXE project. (You may want to add the appropriate using statement to your code files)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Works in Express also.
Use the best guess
|
|
|
|
|
Looking at these messages[^], OP is either a very fast learner or just going through every language until he/she finds one that he/she can understand.
Use the best guess
|
|
|
|
|
Gawd! Looks like he did a two week course in C++ in May and then panicked...
Interesting choice of project to start with "develop your own language" - they didn't give us that on day one of the first year! (They didn't even get us to write a BASIC interpretter until year 3)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Why aren't you out in the sunshine frolicking in the meadows with your sheep? Me; I'm just gathering my strength for a cycle ride to Windsor and back this afternoon.
Use the best guess
|
|
|
|
|
Cause I've spent the day hoovering, fixing the hoover, cleaning out the hoover so the damn thing sucks properly, cleaning the bathroom, dumping dead vermin in the river and hoovering up the remains, etc., etc.
And I've got to pick Herself up from work in an hour, then wash the car this arvo before cooking supper.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Hi ,
What is the difference between integral heiight for Combobox.
Can u show the sample for this .
|
|
|
|
|
|
Hi,
How to identify the event for Form Clousing by pressing keyboard or mouse.
|
|
|
|
|
Winforms, asp,WPF, Silverlight, a little info about the UI might be useful.
Most has a Closing event .
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi
i got full source code with report of e-prescription system in visual studio.
my skills with visual studio is poor and i have a deadline in 20 days..i was hoping if someone can turn the source code into a working system; everything in one folder and send it to my email.
my email is mo599@live.com
i will send the full report with source code..
please i need help im so stressed!
|
|
|
|
|
You would need to go to www.vworker.com and hire someone to do this for you. Good luck as you will probably get what you pay for.
And posting your email address in a public forum is just an invitation for spammers.
|
|
|
|
|
Hi,
I am using Crystal Report in my c# application; how I can get row information from crystal report while double clicking on it.
Thanks & Regards
Thahir
|
|
|
|