|
zebra88 wrote: can i have 2 connection string and two connections
Yes, yes you can
|
|
|
|
|
why i have the error no database specified in connection string or in clause i make the same steps that i make with my previous connection with access db and connection string
|
|
|
|
|
zebra88 wrote: why i have the error
I would have no idea why you are getting that error. Through some strange circumstance, I cannot see your code, your project or read your mind and you have not provided any relevant information that would allow anyone to know what it is that you are trying to do and what you have done.
|
|
|
|
|
|
|
Surely its possible to connect multiple database in same project/Single database in multiple projects and multiple databases in multiple projects. Your issue is some thing else. I googled it and i got a page like this. http://office.microsoft.com/en-in/access-help/HV080760652.aspx
|
|
|
|
|
karthiksruby@123 wrote: Your issue
What issue is it that you are referring to? I am not having any issues connecting to any database.
|
|
|
|
|
no we can not use multiple string conection to connect multiple database in .net if we try to do this we have find a problem cross connection problem
|
|
|
|
|
so how can i get data from access databases that has the same fields but with different content and i want to get data that have the same reference year from them every time i make import a file to a c# program without locally connect the database so with this way i have always updated data because i see what i want without have in mind the old data that has every access file that i use.
i want only the records with the same reference year e.x with year 2013
how i manage this?
one solution i find now is to make restore the access db file so i have always updates data
modified 7-Jul-13 17:43pm.
|
|
|
|
|
Wat, you are wrong. You can have as many connection to as many databases as you need. Downvote required!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
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
|
|
|
|