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: [email protected] 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 [email protected] To unsubscribe please visit http://listserver.u2ug.org/
