|
I am using word 10.0 object library for the printing of the creation of a word document ( with office 2002) it works fine on windows xp but when i deploy the same application on windows 2003 server it doesn't work.
The following Error is generated
" Message Filter Application is Busy";
Can anyone help in this regard
|
|
|
|
|
many anti-virus softwares have they own virus database for scaning.
also i want to build my own database for scaning.
But i dont know how to build one.
and how to search items quickly in the database?
|
|
|
|
|
hi,
You can build your own database using datset object. Create a table and clolumns as you require and then populate the dataset as and when required with the necessary data.
You can persist the dataset as an XML file and reinitialize it by reading from XML file.
In dataset it is possible to run a "select" query and retrieve the data like anyother databases.
If your database is simple name-value collection then you might think of using or extending HashTable class...
Hope this answers your query.
regards,
Aryadip.
Cheers !! and have a Funky day !!
|
|
|
|
|
What Aryadip suggested is hardly quick, depending on the volume you expect to fill your data structure. A virus definitions database, for example, would be far too much for a local DataSet .
Designing your own database requires a good working knowledge of data structures. I suggest you get a good book from Amazon or a university near you about data structures, or take a class if possible. This is well beyond the scope of this or any forum, since some knowledge is required.
There are file-based alternatives out there that would be quicker. The Jet Database (aka - though incorrectly - as Access databases) provides a file-based relational database management system (RDBMS) where you can use ADO.NET. Using an MDB doesn't require that you have Access installed (though it's handy to design the empty database). Access is just an application that uses Jet databases.
There's several other file-based databases as well - just http://www.google.com[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hello
i need help in converting the serial date in Excel into a proper datetime format to be shown in the ListView(in C#)
basically i've imported all the field from an excel worksheet and tabulated into a listview component in C#.
besides i've just read an article about the conversion of Excel datetime into readable format, but i still dont understand the concept of the code.
could anyone out there can guide how to do it?
thank you
|
|
|
|
|
If you have a serial number, simply create a new DateTime starting from 1/1/1900 00:00:00 and add days like so:
DateTime base = DateTime.Parse("1.1.1900");
DateTime fromExcel = base.AddDays(serial); If you want to convert from an OLE Automation date/time (which excel uses), you can use DateTime.FromOADate . Read the .NET Framework SDK documentation for the DateTime structure and its members for more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I used to do this in vc++
inline CMyApp* GetApp()
{
extern CMyApp theApp;
return &theApp;
}
How can I do the same with c# ? The reason is I want my other forms to have access to my main forms resource manager to get strings for localization.
Thanks
|
|
|
|
|
I use the singleton pattern to approach this. There you'll have an unique instance of your MainForm which can be accessed throughout your application.
class MainForm
{
public static MainForm Instance
{
get
{
if (MainForm.instance == null)
MainForm.instance = new MainForm();
return MainForm.instance;
}
}
private static MainForm instance;
protected MainForm()
{
}
}
www.troschuetz.de
|
|
|
|
|
ok thanks! I found it later when I recalled the word static.
|
|
|
|
|
Hi,
I was wondering if it's possible to display select columns from a DataTable to the DataGrid? The code below (of course) displays all the columns in my DataTable.
//view the DataTable in a DataGrid
dataGrid1.SetDataBinding(myDataTable,"");
Thanks!
Ron
|
|
|
|
|
Add a DataGridTableStyle to your grid. Any columns in your table that do not map to a DataGridColumnStyle in your DataGridTableStyle will not be shown. Or you can add a DataGridColumnStyle for every column and set the Width property to zero for the columns you don't want shown.
DataGridTableStyle style = new DataGridTableStyle();
style.MappingName = "myDataTable";
DataGridColumnStyle colStyle = new DataGridTextBoxColumn();
colStyle.MappingName = "col1";
style.GridColumnStyles.Add(colStyle);
colStyle = new DataGridTextBoxColumn();
colStyle.MappingName = "col2";
style.GridColumnStyles.Add(colStyle);
colStyle = new DataGridTextBoxColumn();
colStyle.MappingName = "col3";
colStyle.Width = 0;
style.GridColumnStyles.Add(colStyle);
dataGrid1.TableStyles.Add(style);
Charlie
if(!curlies){ return; }
|
|
|
|
|
Thanks Charlie... I'll give it a go.
Another related question to DataTables:
I'm trying to save a DataTable to an Access DB. My search has come up with this: "Only the DataAdapter serves as a bridge between a DataSet and a data source for retrieving and saving data..."
My question is: Can I use the DataAdapter with a DataTable (not DataSet) to save to the Access db?
Ron
|
|
|
|
|
No. Your DataTable would sit inside a DataSet and be the only table in the set.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave!
One more question (back to DataGrid)...
Is it possible to have the DataGrid (once you have
populated it from the DataTable) to not show
the last "add" row (the row to add more rows).
I want the user to have the ability to still edit
populated rows, but not to add new rows.
Thanks,
Ron
|
|
|
|
|
How can I save a string in a text file.
I can save it in binary file with BinaryFormatter,
but I don't know how to save in a text file.
Thank you very much in advance
|
|
|
|
|
See FileStream class and its Write method. You can write each byte of your string into it with Write method.
Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji
|
|
|
|
|
Thank you very much for your help. Your advice helped me.
I am very happy that I solved my problem!
Thank you very much once again! ))
|
|
|
|
|
What Mazdak said isn't completely right. In order to get the bytes for your string, you need to use an Encoding class like Encoding.ASCII and call the GetBytes(string) method to get the byte[] array ("buffer") that you write to a FileStream . If you use a TextWriter derivative, like the StreamWriter someone else mentioned, it does all this for you automatically. Just make sure to specify which encoding you want to use in the constructor:
using (StreamWriter writer = new StreamWriter("file.txt", true,
Encoding.UTF8))
writer.WriteLine("This is a single line.");
} The using statement here makes sure that the StreamWriter is closed and all unmanaged resources (like file handles) are freed when the block of code is done - even in case of an exception.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
And in order to get those bytes correctly, you need to use an Encoding class and call GetBytes . Using a TextWriter derivative does all this for you and is recommended to use for text files.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
You might want to look at the StreamWriter class. It has an overloaded constructor that lets you point to a file path. Once you have the path you can use the WriteString method. Hope this helps.
|
|
|
|
|
I found where was the problem-
if I want to have carriage return
I should add not only Convert.ToChar(13)
to the string but also Convert.ToChar(10).
I will try also with StreamWriter!
Thank you very much for your advice! ))
|
|
|
|
|
Actually, you should use Environment.NewLine , which is a platform-depenent new-line character. In Windows, this is characters 13 + 10 (\r\n).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thank you very much ))
|
|
|
|
|
"Delphi" != "C#", so this doesn't belong in this forum. Besides, if you have a question specific to an article, you should ask in the message board of that article.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I am using the method publish(Exception ex)
throgh the static member "ExceptionManager" actully i am writing-----> ExceptionManger.publish(ex)
i wondered where i could find the file that hold all the information (Messages) about those Exceptions?
shuold i have to create it?
I dont wont to write those exceptions into my configuration file.
i want to write it into event Log something.
is it possible?
how can i do it?
Thanks in advanced
Dudi
Be Good...
Dudi
|
|
|
|