Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC and empty date
Message
From
08/01/2008 16:54:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01280300
Message ID:
01280378
Views:
19
Thanks again Sergey. Just noticed your new address. Did you move or are you also in hiding?

>Rich,
>
>VFP ODBC driver does not support empty dates in or out. Set empty date to 12/30/1899 instead (mskb #168837). In any other RDMS you would use NULL as they do not support empty dates either.
>
>>We're using a remote connection to a VFP database. When doing an INSERT with an empty date field I get a data mis-match error.
>>? SQLPREPARE(myHandle, "insert into xyz (effect_dt) values (?m.datevar )")---> 1
>>m.datevar=DATE()
>>? SQLEXEC(myHandle) ----> 1
>>m.datevar={}
>>? SQLEXEC(myHandle) ----> -1
>>=AERROR(laError)
>>? laError[2] ----> "Connectivity error: [Microsoft][ODBC Visual FoxPro Driver]Data type mismatch"
>>A straight SQL Insert
>>INSERT INTO xyz (effect_dt) VALUES ( {} )
works just fine.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform