|
Check out ADO.NET and BLOB fields on MSDN. BLOB standing for - binary large objects.
If your not familiar with ADO or ADO.NET.
You need to open a database connection, and then a Recordset (for ADO), or a DataAdapter and a DataSet for ADO.NET.
In ADO (native COM objects), an ADODB.Recorset object can be used to both open a table and a append or update records.
In ADO.NET this functionality is split between the DataAdapter (For speaking to the DB) and the DataSet objects (for programatically examining the data off line).
Good luck.
If your new use the ADO library, and the Recordset.Field.AppendChunk & GetChunk methods to load and extract binary data into an image field.
Quote from a clever bloke :
"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein
|
|
|
|
|
As you know, double clicking a word document (for example) will open MS Word and then open that document. If the document has no file associated to it, “open with” window will appear.
My question, is there a way in C# to imitate (or invoke) such functionality?
|
|
|
|
|
Not a good starting in this forum..I am still searcing and searching for an answer.. It seems I'll answer my self after few days (not bad!)..
|
|
|
|
|
Hi:
I am going to draw graphics in c#, and this process of drawing should be saved (probably with time and pixel). so later can replay the process of how the graphics to be drawn.
but i have no idea on that.
is there any solution or concept on doing this stuff?
very appreciate for your help
henry
|
|
|
|
|
I found a very nice mail server / client written entirely in C# (for .net sp2) with complete and well documented source code.
Has every component that goes into a complete mail server and client applications including MIME attachment handling, DNS, FTP, ICMP etc etc all broken separately for easy usage in other applications. The author states it's freeware.
I found it here originally:
http://www.c-sharpcorner.com/Code/2002/Nov/SMTPPOP3MailServer.asp[^]
But the most up to date version is on the author's site here:
http://www.lumisoft.ee/lsWWW/ENG/Products/Mail_Server/mail_index_eng.aspx?type=info[^]
Someone should convince them to post it to CodeProject, it's definitely worthy and illustrates many different useful concepts beyond the value of the code itself.
|
|
|
|
|
I've been using the Lumisoft mail server for over 6 months in a production environment using SqlServer2K as the mail store. It has been rock solid and is very simple to configure - highly recommended!
Jimmy
|
|
|
|
|
Actually since I posted this, I found several problems with it related to emails with attachments and it became unworkable in our business environment.
Everything was there and in general it worked fine at the time. It just needed to be more "fleshed out" to handle the variety of attachments, html email and globally used date formats correctly. (there was something else but I can't recall exactly what but it was something that would be minor for most but was a major problem for us with the business app I wanted to use it in)
I was going to extend it but ran out of time and had to opt for a commercial component instead (Chilkat).
I still think it's a very nicely written app and a good example of what you can do in C# with a real world application.
I'm curious if you have had any problems with attachments or if they have updated it since March 2003?
------------
Tomorrow is the same day as today was yesterday.
|
|
|
|
|
Hi there,
How can I reach my MySQL database on the net and fetch the datas to a windows form in C#??? Is there a class or library or whatever???
Thanx...
|
|
|
|
|
zamazula wrote:
Is there a class or library or whatever???
You will need ODBC.NET[^] and then also MyODBC[^].
Hope this helps,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
I needed to access a MySql dbase once, so I used dbProvider, it is a managed MySql C# DLL that uses all the same syntax and classes etc as the default SQL ones, I have had no problems with it what-so-ever.
|
|
|
|
|
I am looking for a good way to maintain a clean separation between the GUI, the business objects and the persistence mechanism. It seem as though the forms/asp environment is geared to directly couple the DB with fields on a form. In general, I try to have my GUIs stay dumb and only know about the underlying business objects. Then the business objects either know how to persist themselves, or what to use for a persistence mechanism.
What's the C# / dotNet best practice for keeping these layers distinct?
Thanks,
Bryan
|
|
|
|
|
Hi,
In my program I need after doing some job to be able to shut down the system.
So I wrote that code:
public event SessionEndedEventHandler ShutDown;
protected virtual void OnShutDown(SessionEndedEventArgs e)
{
ShutDown(this,e);
}
and then I wanted on a button click to raise the event:
private void button1_Click(object sender, System.EventArgs e)
{
OnShutDown(new SessionEndedEventArgs(SessionEndReasons.SystemShutdown));
}
But I always get System.NullReferenceException
Anyone has an idea how to solve this problem ?
Thanx in advance
Cheers,
Gogou
GAtanasov
|
|
|
|
|
Hi,
I think that OnShutDown should check that there is a handler for the event, i.e. the code should be:
if (ShutDown != null) ShutDown(this, e);
Chris Jobson
|
|
|
|
|
Hi, all:
I have a master-detail relationship in my MS Access DB. In my WinForm application, I also created same Master-Detail relationship in my dataset. When I delete a row in my datagrid, the entries in the detail table is also deleted in the dataset due to the relationship. After an user finishs editing the data, I call daMaster.Update and then daDetail.Update. I got the DBConcurrencyException when trying to update the detail table. I think the reason is as following: when the master table is updated, it deletes the row marked with "Deleted". Since the relationship is setup in the MS Access DB, it deletes the entries in the detail table of Access DB. When the second Update is called, the record is gone and exception is thrown.
How do I fix this problem? I can not change the order of update, otherwise it will break the new entries ( must exist in the Master table first ). I guess that if I take all the relationship out in the MS Access DB, it will work fine, but I think that probably is not good thing to do.
Please help. Thanks in advance.
Dion
|
|
|
|
|
Has anyone managed to use GetNativeVariantForObject successfully, I can't make it happen.
If you have some small bit of code to share, that would be wonderful.
(System.Runtime.InteropServices.Marshal.GetNativeVariantForObject)
Preben Rasmussen,
Denmark
|
|
|
|
|
If I hide a column with datagrid.Columns(1).visible = False, and the user enters a new record, how can I set a value to the hidden field so that it gets put in the database? Because when I try to access in this fields, I have a error message like if this field does not exist !!!!!
Could you help me
-=zoltx=-
|
|
|
|
|
In Aspx Dot net......Sorry I forgot
-=zoltx=-
|
|
|
|
|
I read the propertyGrid tutorial and I am reading the RAD property grid discussion. But I fail to grasp the part of taking one property type and having it viewed as another type. The one in particular is where a property represents a file location (type string) yet exposes the File Open dialog box. I am assuming that this would be done via a TypeConverter which converts the property type from string to a File Open dialog, but I am just lost in the implementation.
If anyone knows of a tutorial or the implementation of a TypeConverter for this I'd greatly appreciate the help!
Thanks
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Hint: use your favourite decompiler and look at System.Design.dll
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
leppie wrote:
favourite
Are you British, leppie?
On to hacking System.Design.dll! Thanks.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Whoa, leppie!
I searched both of my drives and there is no System.Design.dll installed anywhere!!! So where is that sucker?
Later,
MJ
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Oops, never mind. The search engine was not searching system directories. Found it!
Later.
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
Hi,
i had to write something like the task scheduler of windows 2000. Do you have any hints about this issue ? Any source code that can give me a start about how doing something ?
i need task to be daily, weekly, monthly and yearly with start date, week of month and day of week.
how to deal with days, weeks and month, are there enum's ?
.:Greets from Jerry Maguire:.
|
|
|
|
|
The System.Diagnostics namespace is your starting point.
Processes tab : enum existing processes
Applications tab : filter out the Processes tab with those that have a main window handle
Performance tab : use perf counters (Performance Counter class)
|
|
|
|
|
sorry, i meant task scheduler not taskmanager, my fault.
.:Greets from Jerry Maguire:.
|
|
|
|