Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Empty dates being sent as 12/30/1899
Message
De
12/02/2001 19:41:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00469301
Message ID:
00475129
Vues:
56
>Hi!
>
>As I suggested. I did not known about other solutions for this ODBC/ADO/other stuff problem. VFP dates are of some sort unique data type. This, as you see, cause a lot of changes. Now, imagine the feeling of developers that move something to SQL Server... ARRGGGGHHH!!!
>
Well this weekend 20 in. of snow fell on my house and the power was off for two days. As a result I was able to do some reading on the subject. I think I found the problem and a solution. According to Visual FoxPro 6 Enterprise Development by Rod Paddock & John Pertsen et all the ODBC driver converts the data into a temp table internally. VFP dates transfer as DateTime data types. I was looking through the help files on TTOC and it said any value passed with out a date defaults to 12/30/1899 ( a ha!). So, and correct me if I am wrong the empty dates from my source table are transfered to DateTime and the 12/30/1899 is added. Then that data type is converted to Date when it is handed to me thus showing 12/30/1899.

That all having been said I went into my table definitions and gave the ODBC something to chew on. I set my source table up to accept nulls and default to null for all date fields. I then went to the ODBC driver and unchecked the null check box and low and behold I got blank dates passed through to me. Glory be!!!

My question to you is 1) Is my logic solid and 2) am I going to shoot myself in the foot down the road?

Sorry for being dense reading your previous messages but I was unaware of the intermediate tables used by ODBC.

Thanks Terry
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform