BizTalk Server Orchestration - problem with boolean values and sql adapter

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > March 2005 > problem with boolean values and sql adapter





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author problem with boolean values and sql adapter
Chad

2005-03-08, 5:49 pm

I am trying to map a value that is submitted from a checkbox on a form
to another schema that is designed for an sql insert. No matter what I
mark the value as, it inserts false. I have tried some inline C# in my
transform to convert the "True" value to "1" since that is how sql
likes it, but it has not worked. Has anyone else had trouble
formatting bit values for an sql insert or update??

Matt Milner

2005-03-08, 5:49 pm

What value does your sql schema say it is? Try updating the schema to make
sure it is boolean. Also, what datatype is the column in the database. Sql
does not have a boolean datatype so you must be using something else. Make
sure you are mapping these up correctly.

Matt


"Chad" <chad.crosby@wise.com> wrote in message
news:1110315851.261454.104580@z14g2000cwz.googlegroups.com...
>I am trying to map a value that is submitted from a checkbox on a form
> to another schema that is designed for an sql insert. No matter what I
> mark the value as, it inserts false. I have tried some inline C# in my
> transform to convert the "True" value to "1" since that is how sql
> likes it, but it has not worked. Has anyone else had trouble
> formatting bit values for an sql insert or update??
>



Chad

2005-03-09, 5:50 pm

In my map both schemas mapping the value are set to boolean. The
column in the db is set as a bit field. I have tried using a script
function in the map to convert a true/false value to a bit value. It
looks like this...

public string SQLBool(string blnValue)
{
if (blnValue == "True" || blnValue == "true")
{ blnValue = "1"; }
else
{ blnValue = "0";}

return blnValue;
}

Nothing seems to work. I have an expression write after my transform
in my orchestration and it is writing the value out as False everytime.

Any ideas??

Chad

2005-03-09, 5:50 pm

follow up...if i remove any scripting and just map over the value, it
will write to the screen after the map as the value i entered (which is
an improvement), it was just losing it and always showing false.
however, it still inserts as 0 for the bit value, whether its true or
false.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com