Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Increment time() by 1 minute
Message
De
11/06/2005 07:17:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/06/2005 23:05:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01020951
Message ID:
01022428
Vues:
16
>>>Check Dragan's sample for example and try it a few times.
>
>I thought that was Dragan's sample I was working with???
>
>>>Also try to SQL select with equality operator.
>
>I just did and yes... againsts SQL Server it is buggy. And... it was buggy against free tables in VFP.
>
>
>CLOSE DATABASES ALL
>SET SAFETY OFF
>CREATE TABLE Test1 (dt t)
>=RAND(234)
>FOR X = 1 TO 1000
>  INSERT INTO Test1 (dt) VALUES (DATETIME()+ROUND((RAND()*10000),0))
>ENDFOR
>COPY TO Test2
>SCAN
>  m.tDate = Test1.dt
>  REPLACE Test1.dt WITH m.tDate
>  m.tDate = Test1.dt
>  SELECT * FROM Test2 WHERE dt=tDate INTO CURSOR Temp
>  IF RECCOUNT()#1
>    USE
>    SELECT Test2
>    LOCATE FOR TTOC(Test1.dt)=TTOC(Test2.dt)
>    ? FOUND(),Test1.dt,Test2.dt,Test1.dt=Test2.dt
>    CANCEL
>  ENDIF
>  USE
>  SELECT Test1
>ENDSCAN
>RETURN
>
>
>It was interesting to note that Test1.dt=Test2.dt does return .T. even though the select fails to locate the matching record.

Yes basically it was my point. In real productions we use SQL often and if something fails might debug it with things like (assuming positioned on a record where we expected to be in resultset):

myTable.Time = m.ltTime

and get .T. !

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform