David,
I'm on the road (as usual), doing non-UniVerse stuff. The earliest I will get
to take a look at this is next weekend. Since you have a workaround, I guess
the urgency's gone. Have you contacted IBM support? (And what version of SQL
Server are you using?)
Regards,
Ray
----- Original Message -----
From: "David Tod Sigafoos" <[EMAIL PROTECTED]>
To: "Ray Wurlod" <[EMAIL PROTECTED]>
Subject: Re[2]: [U2] BCI and Dates to SqlServer
Date: Mon, 28 Mar 2005 08:49:27 -0800
>
> Ray,
>
> sorry to do this again but i forgot to mention ..
>
> if i change the 'prepare' section as noted here .. it does work well.
> Now I can modify the read, write shells to force the conversion ..
> but now am really interested in why i am not getting it right to
> begin with <g>
>
>
> *if (SQLBindParameter(sqlStmtEnv, 2, SQL.B.INTDATE, SQL.DATE, 30,
> 0, date) < SQL.SUCCESS) then stop 'date'
> if (SQLBindParameter(sqlStmtEnv, 2, SQL.B.BASIC, SQL.DATE, 30, 0,
> date) < SQL.SUCCESS) then stop 'date'
>
> nbr = 1
> tdate = 13598
> tdate = oconv(tdate,'D4-')
> date = field(tdate,'-',3) :'-': field(tdate,'-',1) :'-': field(tdate,'-',2)
> sqlStatement = 'insert into testDate values (' : nbr : ',' :
> squote(date) : ')'
>
> *sqlStatement = 'insert into testDate values (?,?)'
>
> IF (SQLPrepare(sqlStmtEnv, sqlStatement) < SQL.SUCCESS) then stop 'prepare'
>
> *nbr = 1
> *tdate = 13598
> *tdate = oconv(tdate,'D4-')
> *date = field(tdate,'-',3) :'-': field(tdate,'-',1) :'-': field(tdate,'-',2)
>
>
> Thanks again ..
>
>
>
> Thursday, March 24, 2005, 1:52:39 PM, you wrote:
>
> RW> BCI mimics the ODBC API, so dates are expected to be in ODBC
> format (YYYY-MM-DD).
>
> RW> Using the constant SQL.B.DATE in SQLBindParameter() or
> RW> SQLBindColumn() causes an implicit conversion to occur, so that
> RW> you get internal format out of a SELECT, and must supply internal
> RW> format in bound variables to an INSERT or UPDATE.
>
>
>
> --
> DSig `````
> David Tod Sigafoos ( O O )
> _______oOOo__( )__oOOo_______
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/