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:
01054532
Views:
41
So far my tests with ComCodeBook and a change from VFP 70 ODBC to VFP 90 OleDB has not been too good.

I first had to change the CParameterObjects program to adjust the connection string for VFP. As it was not putting the correct connection string to connect to a VFP database using VFPOleDb.

Second, I had to ensure that the SET ENGINEBEHAVIOR was 70, as VFP 90 had problems with certain SQLs we built in COMCodeBook for our application.

Third, after only a short testing I have seen where table saves/modifications are indicating that they have occurred with no problems. Only to see the data has not been changed completely. Some fields get changed and others do not.

Fourth, I am getting the error "Insufficient base table information for updating or refreshing ..." on table updates where ODBC had no problem.

So you see Craig the ODBC to VfpOleDb transition with ComCodeBook has not been as simple as just telling the ConnCfg table to move from MSDASQL.1 to VFPOLEDB.1.

I suspected that the ComCodeBook code was developed and provided free to all before VFPOleDb was fully developed. So I could not see how ComCodeBook could adjust itself internally to use a provider that was not set in stone when Flash provided ComCodeBook as a free download.

I will put of the ODBC to OLEDB conversion until I have sufficient time to test all areas for problems/bugs in using VFPOleDb.

>COMCodeBook is totally geared to using OLEDB, not ODBC. If you use ODBC, additional layers are added in the Windows stack. YOu'll still use OLEDB, but it will look like this:
>
>COMCodeBook->ADO->OLEDB->ODBC->database
>
>There is MUCH more overhead and resources needed to do this. ODBC is a HUGE resource hog compared to OLEDB. You're using BOTH OLEDB and ODBC.
>
>Also, the VFP ODBC provider has not been updated since VFP 6.0 and does not support any new VFP features added since then.
>
>Make sure you are using the latest VFP OLEDB Provider. Unless you're doing something really bizarre in the application, it should work for everything.
>
>>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?
Bret Hobbs

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

Click here to load this message in the networking platform