Re: Boolean values and SQL Adapter



Hi,

I hit this problem sometime ago...
What I generally do is build a restricted type called SqlBool. Then set the
base data type as an xs:int. Set the 'Derived By' to Restriction... You will
then be able to set the Enumeration to the values of 0 or 1. From here you
can reference this new custom type.

Cheers,
- Mike Watson


"Christoffer" wrote:

> Hi and thanks for the workaround, however;
>
> I can not believe this is "by design" of the BizTalk 2004 team. What,
> really, is the best practice for inserting boolean/bit values using the SQL
> Adapter?
>
> Best regards,
> Chris
>
> "McGeeky" <anon@xxxxxxxx> wrote in message
> news:Ouw6nP8VFHA.3760@xxxxxxxxxxxxxxxxxxxxxxx
> >I have had a similar issue when passing a date to a stored procedure.
> >BizTalk appends a Z to the end of the date which makes SQL Server choke.
> >
> > An option to consider is to change the data type of the parameter in your
> > SQLServer.xsd file to a string or an integer and do the conversion to a
> > bit within the stored procedure itself.
> >
> > --
> > McGeeky
> > http://mcgeeky.blogspot.com
> >
> >
> > "Christoffer" <christoffer@xxxxxxxxxx> wrote in message
> > news:%23PX$hR7VFHA.3572@xxxxxxxxxxxxxxxxxxxxxxx
> >> Hi, I'm using the SQL Adapter to call a stored procedure in my SQL Server
> >> 2000. The stored procedure has a 'bit' parameter, which has been
> >> translated to a xs:boolean in the SQLService.xsd file. When I run my
> >> Orchestration/SQL Adapter I get an error message saying:
> >>
> >> Error converting data type nvarchar to bit
> >>
> >> Running the SQL Profiler, I see that all the parameters are passed as
> >> nvarchar, and that the boolean/bit parameter has been translated to
> >> 'true' instead of '1'. How can I solve this?
> >>
> >> Best regards,
> >> Chris
> >>
> >
> >
>
>
>
.



Relevant Pages