Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #13317

Re: Vo2Ado Empty dates

From Jamal <nospam@example.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Vo2Ado Empty dates
Date 2021-05-22 12:42 -0400
Organization A noiseless patient Spider
Message-ID <s8bc93$1p6$1@dont-email.me> (permalink)
References <b068bd7d-14db-46d7-a927-43c69640f2a6n@googlegroups.com>

Show all headers | View raw


In your app, try calling

AdoConvertNullStringToNull ( TRUE )


P.S. I don't use the Vo2Ado, but I looked at the documentation. Source:


FUNCTION AdoConvertNullStringToNull ( lSet )  AS

Argument(s)

lSet	When TRUE, NULL_STRINGS will be converted to NULL, else an Empty 
value is passed to COM. The default behaviour is NOT to convert them to NULL


Return


The process of converting NULL_STRINGS can be switched ON/OFF by calling 
the AdoCheckNullString function


See Also

Support functions, AdoCheckNullString, Data Types


HTH,
Jamal

On 5/19/2021 8:40 AM, Carlos Vazquez wrote:
> Hi!
> I'm converting some DBF table to SQLServer.  When there is an empty date value, the following code throws an error "type conflict: text is not compatible with date".
> 
> How can I pass empty date values to SQLServer?
> 
> Thanks!!
> ****************
> 
> aParametros := ArrayCreate(2)
> 
> oCmd:CommandText := "INSERT INTO [Ark].[dbo].[Cliente] ( [Ark].[dbo].[Cliente].[Codigo], [Ark].[dbo].[Cliente].[Fecha] ) VALUES (?,?)"
> 
> sCliente:GoTop()
> WHILE !sCliente:EoF
> 	aParametros[ 1] := sCliente:FIELDGET( #CODIGO )
> 	aParametros[ 2] := sCliente:FIELDGET( #FECHA )
> 	//
> 	oCmd:Execute(@uResult,aParametros,NIL)
> 	IF uResult != 1
> 		MostrarError( oCmd:Error:description )
> 		BREAK
> 	ENDIF
> 	sCliente:Skip()
> ENDDO
> 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Vo2Ado Empty dates Carlos Vazquez <frinchis@gmail.com> - 2021-05-19 05:40 -0700
  Re: Vo2Ado Empty dates Phil McGuinness <sherlocksoftware@gmail.com> - 2021-05-21 07:15 -0700
    Re: Vo2Ado Empty dates Carlos Vazquez <frinchis@gmail.com> - 2021-05-22 04:37 -0700
  Re: Vo2Ado Empty dates Jamal <nospam@example.com> - 2021-05-22 12:42 -0400
    Re: Vo2Ado Empty dates Carlos Vazquez <frinchis@gmail.com> - 2023-10-31 11:42 -0700

csiph-web