|
You can create a new font with English &Tamil And use it Or you can use RichTextBox.
Thnaks.
K.Alex
|
|
|
|
|
Hi All,
I seem to be going round and round in circles: could someone kindly set me in the right direction:
How can I get a list of all the database providers installed on my machine using C#?
Thanks,
Martin.
|
|
|
|
|
The following will give you the Datalink properties dialog box.
Add References:
Under COM select:
Microsoft ActiveX Data Objects 2.8 Library
Microsoft OLE DB Service Component 1.0 Type Library
Using MSDASC;
Using ADODB;
namespace Whatever
{
class whatever
{
void Main()
{
DataLinksClass dl = new DataLinksClass();
dl.hWnd = this.Handle.ToInt32(); //use this line if calling from a form
Connection obj = (Connection)dl.PromptNew();
MessageBox.Show(obj.ConnectionString);
/* ^^^^^^^^^^^^^^^^
|
|
|
|
|
hi,
when sending mails using SmtpClient, does it open connection each time I do .Send()
if yes how can i avoid it?
If no what is the mechanism used to send Email.
cheers
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
So, you want to delay the sending of emails until a determine time?
|
|
|
|
|
coolestCoder wrote: mean to say that you need only 1 connection until all the mails you want to send are handed over
this is what i mean !
Is it possible !
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
Sagar K. Godbole wrote: does it open connection each time I do .Send()
I dont think you mean to say that you need only 1 connection until all the mails you want to send are handed over ? If this is the case then you might be unhappy that there is no setting which can persist the connection. ( though i havent checked it myself, it is my perception )
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
yes i meant that.
.send() is a blocking call.
i need to send mails at one go with one connection, this is to get rid of Timeout wait in .Send() which takes place for each Mail that i need to send and if there are too many then its that much of wait for my application,
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
If it's a problem, why not send it in another thread?
|
|
|
|
|
i have arround 300-500 notifications to send at one go..
do you mean those many Threds...
I thought i could do a single connect and if it fails i will
come to know immidiately....
right now ihave a collection of MailMessage objects which i'mpreparing in advanc and then sending it one by one
Thanks,
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
Do they all have the same content?
|
|
|
|
|
no ,
notifications are per action like Task Created,User registed etc..
if they are same is there way to do bulk send?
thanks,
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
Yes, add the people to the "to" list. Instead of one email per recipient, add them to the recipient list, and send one email.
|
|
|
|
|
well thanks,
but thats the way emails are already generated, with multiple To,CC addresses..
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
You can also eliminate the round trip throught the server:
SmtpMail.SmtpServer = "localhost";
eMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"]=1;
eMail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory"] = "C:\\Inetpub\\mailroot\\Pickup";
SmtpMail.Send(eMail);
|
|
|
|
|
edboe wrote: SmtpMail.SmtpServer = "localhost";
its from System.Web.Mail which has been depricated now.
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
|
i have gone through that already,but working with MSSQL 2000
i do not have sql server 2005
nice article though,.
thanks
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
Hi,
There is a SendAsync method, which is of your use, i think.
check this article[^]
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
thanks,
internally it will spawn a thread to do my work,
this will definately fasten up things,
but if i can get that single connection for sending mails it will be great
SmtpConnection class is there but its not exposed otherwise i could have achived behaviour seamlessly.
------------------------------
Its not the fall that kills you; it's the
sudden stop at the end.
|
|
|
|
|
hello programmers!
im creating an application to hold my dvd collection (lame, but i have to start somewhere!)
and im having problems adding a DVD object to an ArrayList.
basically...i have a "DVD" object which is coded as follows:-
using System;
using System.Collections;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Soap;
using System.Windows.Forms;
namespace DVDDatabase
{
[Serializable]
public class DVD
{
//DVD Properties
public string strTitle;
public int intBoxLocation;
public int intBoxNumber;
public DateTime dtDateAdded;
public int intYear;
public string strGenre;
public string strDirector;
public bool boolWatched;
}
[Serializable]
public class Collection
{
public ArrayList arrDVDCollection;
}
}
(note this is in a seperate .cs file)
so, what i want to do is create an instance of "Collection" at run time right? so, my main method is as follows...
static void Main()
{
//Starts The Application
//Load Preliminary Objects
Collection DVDCollection = new Collection(); <<--HERE IT IS!
//Load GUI
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainMenu());
}
ok, so now, on an "Add DVD" button that i have on a SEPERATE form (called AddDVD.cs) i need a command to add the current DVD object to the array list...here we go again!
private void btnAddDVD_Click(object sender, EventArgs e)
{
//create new instance of dvd object
DVD newDVD = new DVD();
//set properties
//set Title
newDVD.strTitle = txtTitle.Text;
//add Dateadded code here
//Set Year
try
{
newDVD.intYear = int.Parse(numYear.Text);
}
catch (Exception)
{
MessageBox.Show("Please Input A Number For Year");
}
//set Director
newDVD.strDirector = txtDirector.Text;
//add Gennre Code Here
//set BoxNo
try
{
newDVD.intBoxNumber = int.Parse(txtBoxNo.Text);
}
catch (Exception)
{
MessageBox.Show("Please Input A Number For Box Number");
}
//set BoxLocation
try
{
newDVD.intBoxLocation = int.Parse(txtBoxLocation.Text);
}
catch (Exception)
{
MessageBox.Show("Please Input A Number For Box Location");
}
//Set Watched Bool
newDVD.boolWatched = chkWatched.Checked;
//add to array list
DVDCollection.arrDVDCollection.Add(newDVD); <<-HERE IT IS!
//Clear form
}
yeah i know i havent coded everything, but im getting there!
anyway, when i compile i get the following email message:-
"the name DVD Collection does not exist within the current context"
i think this is because the original ArrayList definition is not being referenced on the above form (or something like that) but i am unsure how to go about doing that.
if somebody can understand any of that mess i have just written out and offer some help, i would be very thankful
Kris
|
|
|
|
|
At first glance, you need to initialize the instance of arrDVDCollection in the Collection constructor.
|
|
|
|
|
Yep, I couldn't find any code that does instanciate the arraylist object.
Change
[Serializable]
public class Collection
{
public ArrayList arrDVDCollection;
}
}
to
[Serializable]
public class Collection
{
public ArrayList arrDVDCollection = new ArrayList();
}
}
You're done
- - - --[ i love it when a plan comes together ]-- - - -
|
|
|
|
|
Actually, part from the other answers, DVDCollection is created as a variable in the Main() method so it isn't declared in your btnAddDVD_Click method, so just make it a field of AddDVD class.
Offtopic: I would suggest reading some books about object oriented programming, declaring all your fields as public isn't the way you should be programming
|
|
|
|
|
Hi Friends,
I want know to create shared assembly, i know how to create strong name but i will not able to invoke shared assembly. Any one helps me to come out this suitation.
Gopal M Hatekar
|
|
|
|