problem with boolean values and sql adapter
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > problem with boolean values and sql adapter




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    problem with boolean values and sql adapter  
Chad


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-08-05 10: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??






[ Post a follow-up to this message ]



    Re: problem with boolean values and sql adapter  
Matt Milner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-08-05 10: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??
>







[ Post a follow-up to this message ]



    Re: problem with boolean values and sql adapter  
Chad


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-09-05 10: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??






[ Post a follow-up to this message ]



    Re: problem with boolean values and sql adapter  
Chad


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-09-05 10: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.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:10 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register