|
I would use App.config aswell as SeMartens describes, but if you prefer to use a seperate file other than App.config, why not make the main program retrieve the connectionstring from a seperate class with a static method and just have that as a dll file. Then if the connectionstring should change you only have to replace the dll with a new one.
modified on Saturday, June 20, 2009 5:15 PM
|
|
|
|
|
Hi,
I am sending emails with attachment(.txt file) using c#.
I read data from database saved as varchar datatype. I read data in memory stream and output the memory stream as attachment with content type text(.txt file).
It sends emails to gmail, yahoo,hotmail,rediff etc. mail servers with attachment(which is a .txt file) perfectly fine.
(It means there is no problem with code)
But when i send emails to my own mail server it skips the attachment i.e. i get the emails without attachment.
Please help me asap.
What could be the reason?
My mail server IP is 72.9.144.139
Thanks,
Dev
|
|
|
|
|
1) Don't mark your post as Urgent, it's rude and will not get any attention from those who could best help
2) Don't include your server IP address on a public forum. Unless you want your mail server to be used for sending spam.
Could it be that your server is blocking the attachments?
only two letters away from being an asset
|
|
|
|
|
Thanks for your precious suggestions.
We use to send emails with attachment to and from our mail server.
We get emails with attachment from other mail servers also.
I don't think that our server is blocking attachment.
|
|
|
|
|
You thank for help and yet leave the ip address. Interesting.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
The edit button is commonly overlooked by new CP members
SEE THIS IS AN EDIT:
Now all he needs to do is edit his OP and remove IP Address: [REMOVED] so no one can see it...
Oops
Life goes very fast. Tomorrow, today is already yesterday.
modified on Friday, June 19, 2009 9:38 AM
|
|
|
|
|
Why make it worse by highlighting the fact he left his mail server IP address, not that it's anything important or useful to the outside world, it can be resolved with a DNS request. But either way, why repeat it and take attention to his error?
|
|
|
|
|
I'm just playing with him, and if the error was not pointed out then how would he know not to do it in the future?
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
dev sheoran wrote: (It means there is no problem with code)
So why are you posting in a programming forum? Sounds like some setup on your server.
Anyway, thanks for the IP address. I'm sure I could have some fun with that
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi,
I just started to work for a retail company where I am supposed to handle large databases. I need to transfer data from AS400 to MS Access where I will use for reporting purposes.
When I use dataset I receive memory exception. Is it possible to transfer data directly without using dataset(means without using virtual memory).
Thanks in advance
|
|
|
|
|
Why would they want to transfer the data to Access Do they realize there are reporting solutions that will work without the transfer. Or at least use SQL Server, Express is free and coupled with SSRS it would be better than Access, IMHO
You could do it with a datareader, transfer one record at a time.
only two letters away from being an asset
|
|
|
|
|
Access can be a very good reporting tool but the problem with many Access users is that they tend to want to import the data into access and then report on it. Instead, you should create linked tables in access and then create parameterised queries on which to base the reports. Doing so will ensure that only the data you're reporting on gets copied temporarily into access
|
|
|
|
|
Why respond to my answer, respond to the original post
only two letters away from being an asset
|
|
|
|
|
Thank you both,
For sql Server Suggestion; No way, they would not consider purchasing it.
Access, I will create one table that has links to different tables, since the data I am going to use is huge for Access.
|
|
|
|
|
SQL Server Express is FREE. Advanced includes SSRS also. You would be setting the company up with better tools and positioning them for better migration. The tools are FREE, only costs a little time to download and install. Rather than having individual copies of Access databases floating around it could be centralized. Better management, more accurate reporting.
IMHO
only two letters away from being an asset
|
|
|
|
|
Thank you again.
I will suggest them.
All the best.
|
|
|
|
|
Hi All,
I've been poking around Google / Apache.org trying to get to the bottom of this with no luck. There isn't a lot of info anywhere on configuring log4net using pure C# so I thought I'd try here now.
I can log to the "Application" log with no problems. I can also create "MyLog" event log without problems as well, however, writing to "MyLog" fails to actually write an event log entry. The code I'm using to configure an EventLogAppener is:
public static void ConfigureEventLogAppender(string appName, string logName)
{
PatternLayout layout = GetDefaultLayout();
_eventLogAppender = new EventLogAppender();
_eventLogAppender.ApplicationName = appName;
_eventLogAppender.Layout = layout;
_eventLogAppender.LogName = logName;
_eventLogAppender.Threshold = Level.All;
_eventLogAppender.ActivateOptions();
BasicConfigurator.Configure(_eventLogAppender);
}
Has anyone managed to get this working?
Cheers,
|
|
|
|
|
Hello Experts!!
i want to check system date and my date so i can avoid date mismatch.
when my date is greater than system date then it must give date mismatch error.
I am using it for checking my project expiry date......if anybody have another way then free to tell me.......
Is anybody have code for it????
|
|
|
|
|
DateTime _SystemTime = DateTime.Now;
If(_SystemTime != mytime)
{
}
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I assume "my date" is the date of installation. Just comparing the dates is not enough. What if one changes the system date?
जय हिंद
|
|
|
|
|
There's always the NTP[^] protocol to annoy cheaters - but that begs the question what happens to users without an internet connection
I are troll
|
|
|
|
|
|
ya mydate is my installation date.....so if anyone change system date then that will affect on project.How to handle this?
|
|
|
|
|
Don't bother, are you so greedy that you must even catch the people who go through big trouble to apply workaround that could mess up their system? Almost no one will change their system date, and the people who will aren't about to buy anything anyway. So avoiding wasting time on things like that is a bigger win.
|
|
|
|
|
KIDYA wrote: my installation date
If you're storing that somewhere I can probably change it, I don't even need to change the system time.
|
|
|
|