RE: Re[2]: [U2] BCI and Dates to SqlServer

2005-03-29 Thread Hona, David S
I noticed the difference between this example and the previous is that your
nbr and tdate varaibles were set being null string values just before
the SQLBindParameter. Yet this example (with no parameter markers) is force
feeding the values and it is working. This suggests that you are passing
empty strings/values - perhaps? Just speculating here!

I suggest to you change populate the variables prior to the bind and see
what happens. I've experienced similar issues with SQLBindParameter and
SQLExecDirect in older BCI releases.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Tod Sigafoos
Sent: Tuesday, 29 March 2005 2:49 AM
To: Ray Wurlod
Cc: u2-users@listserver.u2ug.org
Subject: Re[2]: [U2] BCI and Dates to SqlServer


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)
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: Re[2]: [U2] BCI and Dates to SqlServer

2005-03-28 Thread Ray Wurlod
Can you re-send the sample code?  I seem to have deleted it already.

Thanks,
Ray
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: Re[2]: [U2] BCI and Dates to SqlServer

2005-03-25 Thread Ray Wurlod
What happens if you replace SQL.B.INTDATE with SQL.B.BASIC in the 
SQLBindParameter call?
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/