Samplclnt example in MDAC 2.8: My Story



Hello,

I was wondering what people's experiences were in playing around with the
OLE DB provider/consumer sample that is included in the MDAC 2.8 SDK. So
far, it hasn't been great for me.

I started off by attempting to build the sample provider DLL, which is the
what the consumer client uses to read the rudimentary .csv data file. In
terms of my development IDE, our company is playing around with the VS 2005
beta, so that is what I have installed on my machine. After I opened &
converted the project, I attempted to build it. I was met by a bevy of
compiler errors. Upon scrutinizing the errors, I realized that most of them
were probably a result of a relatively new compiler working with relatively
older C++ source files ;-). The source files did things like use the "old
style" C++ headers (e.g. <fstream.h> instead of <fstream>, which the
compiler apparently wouldn't tolerate. So, I worked through those issues,
and finally got the project to compile, but then it wouldn't link. Seems
that there were numerous duplicate symbols defined in a library that the
project depended on, I believe it was msdasc.dll (spelling?). Just as an
attempt to solve the problem, I removed this library from the project
dependencies, and it then succeeded in linking.

Next I moved on to building the sample consumer application, samplclnt. This
project was much less difficult to build, in terms of the number of compiler
errors. So, I decided to try to run the application. The first roadblock I
ran into was that the .csv data file wasn't in the right place; I had to
copy that into the debug directory that the actual executable was written
to. Next, I realized that the sample application wasn't recognizing the
sample OLE DB provider. I guess the OLE DB provider information is resident
in the system registry. So, my solution here was to register the sample
provider DLL, using regsrv32. This successfully registered the sample OLE DB
provider, so the consumer application can now recognize & use it. So now,
when I run the sample app., I'm getting errors from some of the interface
implementations in the provider code. This is where I've pretty much ceased
to troubleshoot. From what I can tell, it looks like the provider might have
a bug in the low-level file IO routines used to read the .csv data file. I
was curious if others got the sample application to run, and if they also
encountered these errors.

Overall, I was quite surprised that I needed to jump through these hoops
just to compile & link the sample code in the latest VS C++ environment. Is
there not a more recent distribution of the MDAC SDK sample files? I think
2.8 is the most up-to-date version, but what I 'm looking for here is
something other than pre-standardized source code that was written before or
around 1998. One would be tempted to think that Microsoft might consider
distributing a more contemporary sample if they were serious about people
using OLE DB. Or maybe we're supposed to just keep using ODBC, which
although it has been officially deprecated, I'm told still performs better
than OLE DB.

-Michael


.



Relevant Pages

  • Re: Samplclnt example in MDAC 2.8: My Story
    ... I was incorrect when I stated that ODBC as a whole is deprecated. ... ODBC provider for OLE DB is deprecated; ... > | compiler errors. ...
    (microsoft.public.data.oledb)
  • 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)