Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote view date values
Message
De
11/06/2002 23:07:24
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00665797
Message ID:
00667206
Vues:
15
I created a custom class and put this code in a method to retrieve date values and store to the property of the class(.date1 & .date2). I then compiled this class as getdate.dll

WITH this
cSQL = [ SELECT * FROM ACCOUNTING!callinv WHERE callrefno = ]+ALLTRIM(STR (nCallrefno))
.oCallInvRS = .oConn.Execute(cSQL)

IF !.oCallInvRS.EOF()
.OCallInvRS.Movefirst
.date1 = .oCallInvRS.Fields("date1").Value
.date2 =.oCallInvRS.Fields("date2").Value
endif
endwith


In the load event of my form I created an instance of the dll and store it to a property of the form.

thisform.getdate = createobject(getdate.method1)

I then executed this method to get the date values and assign them to the property of the dll (date1 & date2). Date1 and Date2 and assigned as controlsource for the txtbox in the form.

Now if I have a .Null. value for date1 and an empty value( / / ) for date2 in the base table, Upon executing the dll, the return values will be 12/30/1899
Music Rocks www.musicreserve.blogspot.com
Success is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform