Samplclnt example in MDAC 2.8: My Story
- From: "Michael Skelton" <mskelton@xxxxxxxxxxxxx>
- Date: Mon, 14 Nov 2005 12:45:13 -0500
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
.
- Follow-Ups:
- RE: Samplclnt example in MDAC 2.8: My Story
- From: Warren Read
- RE: Samplclnt example in MDAC 2.8: My Story
- Prev by Date: Re: Error msg
- Next by Date: RE: Samplclnt example in MDAC 2.8: My Story
- Previous by thread: Re: Apartment model OLEDB Provider
- Next by thread: RE: Samplclnt example in MDAC 2.8: My Story
- Index(es):
Relevant Pages
|