Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP to SQL-Server... only get results on second execution
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
VFP to SQL-Server... only get results on second execution
Divers
Thread ID:
00233905
Message ID:
00233905
Vues:
62
HELP...

We have a system going against SQL-Server 6.5. Our problem is that intermittently it won't create a new back-end table until it is executed a second time...
( Ex: SQL-Server Syntax)
select a.fld1, a.fld2, a.fld3, sum( a.fld4) fld4
   into MyDataBase.dbo.NewTable
   from MyDataBase.dbo.MySource a
   group by a.fld1, a.fld2, a.fld3

No where clause required... and the result of this set may be about 1,000 records (not large)

Then we need to further derive data from that and issue

select a.fld1, a.fld2, sum( a.fld3 ) fld3, sum( a.fld4 ) fld4
  into MyDataBase.dbo.AnotherNewTable
  from MyDataBase.dbo.NewTable a
  group by a.fld1, a.fld2
This version of the query fails... The back-end table should result with about 150 records from the original 1,000. HOWEVER, if we drop the table MyDataBase.dbo.AnotherNewTable after it was created here, then re-issue the exact same statement, we get the proper results.

We've tried timing issues and issuing checkpoints. Nothing appears to work. We would greatly appreciate any insight to this... The SQLPrepare() and SQLExecute() both identify that it is a valid statement and return positive value (1) but only return an empty file structure on the back-end.

TIA
Répondre
Fil
Voir

Click here to load this message in the networking platform