Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC remote view bug
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00833690
Message ID:
00833706
Vues:
23
You can also use BugList here in UT. AFAIK FoxTeam is checking it.
http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~4,25,1

>The following code causes Visual FoxPro 8.0 to GPF (also causes version 7.0 to GPF). It seems that Visual FoxPro remote views cannot handle dates in the year 2120. The remote data database can be Oracle or SQL Server. Is there a way to submit this as an SFR to MS?
============================================
LPARAMETERS tcDSN, tcUID, tcPWD
LOCAL h, e, i

close All

*************************************************************************
* Delete existing local data first, so we get a fresh test
*************************************************************************
if file( "test2120.*" )
delete File test2120.dbc
delete File test2120.dct
delete File test2120.dcx
delete File test2120.dbf
delete File test2120.cdx
endif

*************************************************************************
* Create source data
*************************************************************************
create Table source2120 free ( df_key c(8), df_date d )
index on df_key tag source_key
for i = 1 to 100
insert into source2120 ( df_key, df_date ) values ( ltrim(str(i)), {^2120/1/1} + i - 1 )
next
use in source2120

*************************************************************************
* Connect
*************************************************************************
h = sqlconnect( tcDSN, tcUID, tcPWD )

*************************************************************************
* Create remote table, dropping any existing table first
* Note: If using SQL Server, use DATETIME for df_date field.
* If using Oracle, use DATE for df_date field.
*************************************************************************
e = sqlexec( h, 'drop table test2120' )
e = sqlexec( h, 'create table test2120 ( df_key char(8), df_date datetime)' )
if e < 0
? 'Error'
return .f.
endif

*************************************************************************
* Create local database and view, deleting existing copies first.
*************************************************************************
create database test2120
create Connection con DATASOURCE ( tcDSN ) USERID ( tcUID ) PASSWORD ( tcPWD )
create sql view test2120 REMOTE CONNECTION con AS SELECT * FROM test2120
DBSetProp("test2120", 'View', 'UpdateType', 1 )
DBSetProp("test2120", 'View', 'WhereType', 3 )
DBSetProp("test2120", 'View', 'SendUpdates', .T. )
DBSetProp("test2120", 'View', 'Tables', "test2120" )
DBSetProp("test2120", 'View', 'Prepared', .F. )
DBSetProp("test2120", 'View', 'CompareMemo', .F. )
DBSetProp("test2120", 'View', 'FetchAsNeeded', .F. )
close Databases

*************************************************************************
* Append local data into remote table
*************************************************************************
open database test2120
use test2120!test2120
append from source2120
tableupdate(0,.T.)

*************************************************************************
* Check contents of remote table, IF it gets this far.
*************************************************************************
? sqlexec( h, "select * from test2120" )

---------------------------</i>
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform