C# OLE DB sample?

Hello everyone,
I am learning how to use C# to implement an OLE DB provider (a simple one which is based on CSV file format). I can not find any samples from MSDN (all samples are C++).
Any reference materials?
thanks in advance,
George
[267 byte] By [George2] at [2007-11-20 9:16:23]
# 1 Re: C# OLE DB sample?
Look at www.connectionstrings.com for a conenctionstring, rest all should be almost same as you would do with access database.
Shuja Ali at 2007-11-9 11:34:09 >
# 2 Re: C# OLE DB sample?
Sorry Shuja,

Look at www.connectionstrings.com for a conenctionstring, rest all should be almost same as you would do with access database.

I have not found any relationship between this web site and my question. I am going to find some samples for how to implement an OLE DB provider in C#, not the connection string itself.

regards,
George
George2 at 2007-11-9 11:35:09 >
# 3 Re: C# OLE DB sample?
The reason for me to direct you to this site is that you can get a conenctionstring that can be used to read CSV files using the OLEDBConnection. This link contains a sample on how to use OLEDB namespace. You just need to change the connectionstring.
http://msdn2.microsoft.com/en-us/library/system.data.oledb.oledbconnection(VS.71).aspx
Shuja Ali at 2007-11-9 11:36:08 >
# 4 Re: C# OLE DB sample?
Thanks Shuja,

The reason for me to direct you to this site is that you can get a conenctionstring that can be used to read CSV files using the OLEDBConnection. This link contains a sample on how to use OLEDB namespace. You just need to change the connectionstring.
http://msdn2.microsoft.com/en-us/library/system.data.oledb.oledbconnection(VS.71).aspx

What you provide is how to use OLE DB provider (as an OLE DB consumer), but what I am looking for is how to implement OLE DB provider, here is the related sample in C++,

http://msdn2.microsoft.com/en-us/library/ms715011.aspx

I am looking for a C# sample.

regards,
George
George2 at 2007-11-9 11:37:14 >
# 5 Re: C# OLE DB sample?
Geroge;

I have the same problem trying to write a VC# to access a Db access.
Many years ago i had done that in MFC , a piece of cake however with C# is not that straight forwad or perhaps i m too new to .net
If you managed to find the way to the problem let me know mate.

Cheers
Saeed at 2007-11-9 11:38:14 >
# 6 Re: C# OLE DB sample?
Thanks Saeed,

Geroge;

I have the same problem trying to write a VC# to access a Db access.
Many years ago i had done that in MFC , a piece of cake however with C# is not that straight forwad or perhaps i m too new to .net
If you managed to find the way to the problem let me know mate.

Cheers

I am still taking some of my time researching this issue. I want to learn what in your experience is the most difficulties of implementation by C#?

regards,
George
George2 at 2007-11-9 11:39:13 >
# 7 Re: C# OLE DB sample?
lack or enough examples and gurus i guess,
or perhaps once you dont know something it is just frustrating,

CDatabase, CRecorsset ,... they get the job done in MFC , in C# god knows.
i will post the solution if i found it sonner than you.
cheers
Saeed at 2007-11-9 11:40:07 >
# 8 Re: C# OLE DB sample?
I agree with you Saeed. What I met with is about data type conversion, for example, the structs defined in oledb.h can not be found in C#.

I am looking forward to your sample and solution. I suggest you post a tutorial into dev-archive when you find a solution. :-)

lack or enough examples and gurus i guess,
or perhaps once you dont know something it is just frustrating,

CDatabase, CRecorsset ,... they get the job done in MFC , in C# god knows.
i will post the solution if i found it sonner than you.
cheers

regards,
George
George2 at 2007-11-9 11:41:10 >
# 9 Re: C# OLE DB sample?
here is how you can connect.
http://www.java2s.com/Code/CSharp/Database-ADO.net/ConnecttoAccessdatabase.htm
Saeed at 2007-11-9 11:42:19 >
# 10 Re: C# OLE DB sample?
Hi Saeed,

here is how you can connect.
http://www.java2s.com/Code/CSharp/Database-ADO.net/ConnecttoAccessdatabase.htm

I do not know why you send this link. It is about how to use OLE DB provider. Our purpose is how to implement OLE DB provider.

;)

regards,
George
George2 at 2007-11-9 11:43:10 >
# 11 Re: C# OLE DB sample?
George, try these links:

ADO.NET: Building a Custom Data Provider for Use with the Data Access Framework (http://msdn.microsoft.com/msdnmag/issues/01/12/DataProv/)

Implementing a .Net Data Provider (http://msdn2.microsoft.com/en-us/library/4ksaf9z5(vs.71).aspx)

I'm not sure these will get you all the way there (as I didn't read them completely), but they are probably a good starting point.
Arjay at 2007-11-9 11:44:20 >
# 12 Re: C# OLE DB sample?
Thanks Arjay,

George, try these links:

ADO.NET: Building a Custom Data Provider for Use with the Data Access Framework (http://msdn.microsoft.com/msdnmag/issues/01/12/DataProv/)

Implementing a .Net Data Provider (http://msdn2.microsoft.com/en-us/library/4ksaf9z5(vs.71).aspx)

I'm not sure these will get you all the way there (as I didn't read them completely), but they are probably a good starting point.

They are very good resources!

regards,
George
George2 at 2007-11-9 11:45:19 >