Skip navigation

If you try and compile and run the microsoft sdk sampClnt using their instructions they leave out one important detail:

running sampclnt.exe
Sun Jul 12 11:22:41 2009


Connecting to the SampProv sample data provider...
Error at file: c:\program files\microsoft sdks\windows\v6.1\samples\dataaccess\oledb\sampclnt\sampclnt.cpp  line: 317  
CoCreateInstance: Returned <unknown>
Error at file: c:\program files\microsoft sdks\windows\v6.1\samples\dataaccess\oledb\sampclnt\sampclnt.cpp  line: 206  
GetSampprovDataSource: Returned <unknown>
Error at file: c:\program files\microsoft sdks\windows\v6.1\samples\dataaccess\oledb\sampclnt\sampclnt.cpp  line: 122  
DoTests: Returned <unknown>

so the fix for this is to first compile the sampprov project, then switch into C:\Program Files\Microsoft SDKs\Windows\v6.1\Samples\dataaccess\oledb\sampprov\Debug, (like, open a command prompt..)

cd C:\Program Files\Microsoft SDKs\Windows\v6.1\Samples\dataaccess\oledb\sampprov\Debug
regsvr32 sampprov.dll

THEN you can run the sampclnt example, making sure to put the .csv file it uses in the same directory as its executable.

I only knew this from a hint from this post, where he says

Hi, what is the problem with the OLEDB sample client, obtained from Data
Acess SDK 2.8?
I registered the sample provider as regsvr32 \sampprov, which was
successful.

Here is the log:

running sampclnt.exe
Thu Jun 23 12:44:52 2005

Connecting to the SampProv sample data provider…
Getting a DBSession object from the data source object…
Getting a rowset object from the DBSession object…
Error at file: c:\msdn\sample\sampclnt\sampclnt.cpp line: 517
IOpenRowset::OpenRowset: Returned DB_E_NOTABLE
Error at file: c:\msdn\sample\sampclnt\sampclnt.cpp line: 224
GetRowsetFromDBCreateSession: Returned DB_E_NOTABLE
Error at file: c:\msdn\sample\sampclnt\sampclnt.cpp line: 119
DoTests: Returned DB_E_NOTABLE

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: