Re: update ADO Date type data to MSSQL problem
From: Val Mazur (group51a_at_hotmail.com)
Date: 07/20/04
- Next message: Coneection OLAP: "Hi Wlliam"
- Previous message: Val Mazur: "Re: Hierarchical Recordset"
- In reply to: tsair: "Re: update ADO Date type data to MSSQL problem"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Jul 2004 22:31:51 -0400
Hi,
Hard to say why first case does not work, because I do not see any
difference, except just different steps to achieve same result. I think that
DTOT(dDate) does not return result as a Date datatype, which is compatible
with the ADO recordset's Date datatype. If ddate1 variable is declared as a
date, then it might work.
Second case (with the empty date) will not work, because you cannot assign
empty (//) date to the field. It is just not allowed in ADO. All you could
do is to assign Null value. This is why it works with Null
--
Val Mazur
Microsoft MVP
"tsair" <tsair@myjaring.net> wrote in message
news:Otr%23MWwaEHA.3352@TK2MSFTNGP12.phx.gbl...
>I try this
>
> dDate = {01/01/2004}
>
> this.oRs.Fields( 'ExpDate' ).Value = DTOT(dDate)
> ERROR
>
> ddate1 = DTOT( ddate )
> this.oRs.Fields( 'ExpDate' ).Value = ddate1
> OK
>
> ddate = {//}
> ddate1 = DTOT( ddate )
> this.oRs.Fields( 'ExpDate' ).Value = ddate1
> ERROR
>
> this.oRs.Fields( 'ExpDate' ).Value = .NULL.
> OK
>
> Why like this ?
>
>
> "tsair" <tsair@myjaring.net> wrote in message
> news:OOBecTmaEHA.4048@TK2MSFTNGP10.phx.gbl...
>> I create a field with type smalldatetime in MSSQL database.
>> I use ADO to call the recordset and convert the datetime to VFP date
>> type
>> with TTOD()
>> I convert the date data to DateTime type with DTOT() and then send to
> MSSQL
>> update.
>>
>> I t show message : Multiple-step operation generated errors. Check each
>> status value....,
>>
>> How can i update the date value into SQL Server ?
>>
>>
>>
>
>
- Next message: Coneection OLAP: "Hi Wlliam"
- Previous message: Val Mazur: "Re: Hierarchical Recordset"
- In reply to: tsair: "Re: update ADO Date type data to MSSQL problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|