Re: C# OLE DB sample?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks for your advice, Nicholas!


Do you know any tools to convert C++ code to C#?


regards,
George

"Nicholas Paldino [.NET/C# MVP]" wrote:

The question was clear enough, as was the answer. Mark was trying to
see what the basis for the question was, thinking that you might be trying
to do this because you need a provider for OLE DB to work with CSV files.
Since you didn't specify either way what your reasoning for wanting to do
this when there is already something in place (for example, as a learning
exercise), Mark made a (IMO valid) guess as to what you were trying to do.

That being said, there is no sample in C# to create a custom OLE DB
provider. You can use the C++ sample, and convert it to C#, but be warned,
it is not a direct conversion, and will require a good amount of retooling
and interop (but it IS possible).


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"George" <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:645FDC72-BA37-4249-9264-4FA876DF5A3E@xxxxxxxxxxxxxxxx
Hi Mark,


Maybe I have not make my question clear. I have not seen any relationship
between your reply and my question.

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

"Mark Rae [MVP]" wrote:

"George" <George@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:978042B5-E4F6-47B6-AF66-F0F6352500F2@xxxxxxxxxxxxxxxx

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++).

I wonder if you're actually trying to re-invent the wheel here, as there
is
already a perfectly good driver for this in the Jet OleDb provider:
http://www.connectionstrings.com/?carrier=textfile


--
Mark Rae
ASP.NET MVP
http://www.markrae.net





.



Relevant Pages

  • ADO and trace
    ... Is it possible to trace what ADO exactly does with an MS Access database (Jet 4.0 Ole Db Provider)? ... Best regards ...
    (borland.public.delphi.database.ado)
  • Linked server to as400 - for the love of god please help.
    ... i'm trying to setup a linked server between SQL Server and an AS400/DB2/IBM ... OLE DB provider 'MSDASQL' reported an error. ... OLE DB error trace [OLE/DB Provider 'IBMDA400' IColumnsInfo::MapColumnIDs ...
    (microsoft.public.sqlserver.server)
  • Problem with Linked Server from SQL to DB2
    ... I'm trying to setup a linked server from SQL to DB2 UDB. ... Microsoft provided OLE DB driver for DB2 and the IBM DB2 OLE DB ... -- Invalid schema or catalog specified for provider 'IBMDADB2'. ...
    (microsoft.public.data.oledb)
  • RE: Samplclnt example in MDAC 2.8: My Story
    ... | OLE DB provider/consumer sample that is included in the MDAC 2.8 SDK. ... | what the consumer client uses to read the rudimentary .csv data file. ... | compiler errors. ... | sample OLE DB provider. ...
    (microsoft.public.data.oledb)
  • RE: Database Lookup Functoid Connection String
    ... A OLE DB provider is a COM component which implement a number of COM ... And connection string is a way to initialize a OLE DB provider. ... accessed by the BizTalk server account, ...
    (microsoft.public.biztalk.general)