1st problem -  - the  data type - is a date or datetime - have you tried the
other - or even a timespan.

 

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Cooper, Rudy
Sent: 04 November 2011 22:02
To: 'u2-users@listserver.u2ug.org'
Subject: [U2] BCI

Need some help on using a bci function with sql server.

We are running UV 10.3.3 on windows 2003 server sp2.

We've been using bci to run sprocs in sql server.

A couple of things came up that we're having problems with which we have
never used before and thought this list might be of help to us.

1st problem:  We're passing an internal uv date to a sproc whose data type
is date.
Here are the parameters:
STATUS = SQLBindParameter(STMTENV, 4, SQL.B.INTDATE, SQL.DATE, 8,  0,
STARTDATE, SQL.PARAM.INPUT) We've never used SQL.B.INTDATE and SQL.DATE
before, but according to the bci documentation that is what your are
supposed to use when sending a date to a sql date data type.
After the sqlexecute this is the error we get:


SQLExecute_SqlExecute Error, state S1C00 Natcode 0 Errtxt [IBM][SQL
Client][ODBC ][Microsoft][ODBC SQL Server Driver]Optional feature not
implemented

What the heck does that mean?  Could it be that we have an old driver?

2nd problem:  How do I retrieve an output value from a stored procedure?
There is a conditional that sets a variable in a sql stored procedure and
sets it to an output variable, like so:

@ReturnValue int OUTPUT
If  (select isdate(@StartDataScopeDate)+isdate(@EndDataScopeDate)) < 2
return 1 @ReturnValue = @ReturnValue OUT

How can I get the value of 'OUT'?
For retrieving the values of a dataset we'd use sqlbindcol and sqlfetch, but
I don't think that will work in this case.
The sqlbindparameter looks like this:
STATUS = SQLBindParameter(STMTENV, 6, SQL.B.BASIC, SQL.VARCHAR, 8, 0, NUL3,
SQL.PARAM.OUTPUT) I'm just assuming I should use SQL.PARAM.OUTPUT instead of
SQL.PARAM.INPUT.

Any help would be greatly appreciated.

Thx,

Rudy

Learn more about SAGE Research Methods Online (SRMO) - the essential tool
for researchers http://www.srmo.sagepub.com


_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1411 / Virus Database: 2092/3996 - Release Date: 11/04/11

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to