Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving Flash Com Code Book from Vfp7 to Vfp9
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01052115
Message ID:
01052486
Views:
25
It was in ComCodeBook Craig. The code is generating an Invalid Connection string. After some checking I found that ComCodeBook is reading the configuration table and generating a ConnectionString of:

"Provider=VFPOLEDB.1;Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;SourceDB=c:\Mwsdata\MasterWebSystem.dbc;PWD=;UIC=sa;"

Which when tried manually wil produce the error that is coming from the ComCodeBook DLL's.

Changing the ComCodeBook class code to produce a connection string of:

"Provider=VFPOLEDB.1;Driver={Microsoft Visual FoxPro Driver};SourceType=DBC;Data Source=c:\Mwsdata\MasterWebSystem.dbc;PWD=;UIC=sa;"

The above works to get ComCodeBook connected.

But then the ComCodeBook DLL's start to break down when accessing the data tables. I now get the error:

An exception occured when executing a COM method.
...PssProcurementDataSource::ExecuteSqlQuery()
OLE IDispatch code 0 from Microsoft OLE DB Provider for Visual FoxPro:
Operation is invalid for a Memo, Blob, General or Picture field.. in 'PssProcurements'

So either ComCodeBook is geared more toward ODBC or Ole DB has less capability than ODBC had. All the SQL calls worked for ODBC, I would hate to have to go back to test every SQL that is being used inside of ComCodeBook. But I may have to to move to Ole DB from ODBC.

By the way in order for me to justify my time on this. What is the benefit to my boss of getting ComCodeBook to work with VFP OleDB versus ODBC?

>THe error has nothing to do with COMCodebook. It has to do with the configuration string being created or with something in the database that is not supported by the OLEDB provider. Check the stored procs in the db.
>
>>Well just changing the provider from MSDASQL.1 to VFPOLEDB.1 did not work. I get another OLE Idispatch exception error 1429 indicating that line 1367 "UserDataSource :: OpenConnectionObject() OLE Idispatch exception code 0 from Microsoft OLE DB Provider for Visual FoxPro. Feature is not available.
>>
>>So my guess is that ComCodeBook, as I have the code, was really set up for ODBC using MSDASQL.1 and developed before VFPOLEDB.1 ever came along. By the way I tested the standalone using MSDASQL.1 and it worked ok against the database.
>>
>>Since COMCodeBook was free and developed some time ago, my only option is to delve into the classes and see what needs to be changed.
>>
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform