Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is faster: insert from memvar or insert fields?
Message
 
 
To
25/07/2006 06:55:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01139366
Message ID:
01139653
Views:
10
>>>>What do you think about age? Is there a simpler way to find person's age in years?
>>>
>>>(val(dtoc(date(),1)) - val(dtoc(m.bDate),1))/10000
>>>
>>>could be used for years.
>>>Cetin
>>
>>How accurate it is? Can I rely on it?
>
>I said "for years", so it's accurate for years resolution (typo on code - dtoc(m.bDate,1)).
>I wrote Age class for high level of accuracy where it was important to know age to last detail (ie: drug dosage in an infant).
>I don't know if you were serious saying all your validation was about 120 years. I would then only check if !empty(bDate). 120 part is not accurate in itself. Depending on source you might already be threating invalid dates as valid dates (ie: SQL server is in use w/o not allowing null in datetime fields and there were values which in fact meant to be empty).
>PS; Did you read my note about GetUSeID(). I think it's the bottleneck and you could speed up just removing it.
>Cetin

Cetin,

I read it, but didn't realize, since it was late at night and I was tired. But of course you're right and I should not call this function since I already called it once and saved it in class property cUserID. That's quite stupid of me of ignoring such an important point.

As for 120 years, that's what my colleague put and I didn't question its validity. But of course we don't need age class for this and using year() function would be sufficient.

I've just talked with my colleague (the one who writes converting data to stage tables program) about source of the data. We recieve data as tab delimited text files, where certain fields are on certain positions. He doesn't know the original source of the data and suspects it to be a mainframe (told me to ask my manager who knows this much better, but he is not here yet).

I don't think it's SQL Server.

Anyway, very good point of GetUserID and sorry for not understanding this earlier.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform