hi
try to use:Calculate Age from BirthDate
Function BeforeAdd($dict)
{
str = "SELECT DateDiff('yyyy','" & dict("BirthDate") & "', Now()) AS Age FROM fsinfo"
Set rsTemp = server. CreateObject ( "ADODB.Recordset" )
rsTemp. open str , dbConnection
dict("Age") = rsTemp("Age")
BeforeAdd = True
End Function
}
Parse error: syntax error, unexpected '=' in /home/content/98/11753698/html/billing/include/fsinfo_events.php on line 106
and also before record updated:
Function BeforeEdit(dict, where)
str = "SELECT DateDiff('yyyy','" & dict("BirthDate") & "', Now()) AS Age FROM fsinfo"
Set rsTemp = server. CreateObject ( "ADODB.Recordset" )
rsTemp. open str , dbConnection
dict("Age") = rsTemp("Age")
BeforeEdit = True
End Function
Thank You