|
Home > Archive > BizTalk Server > February 2007 > sql adapter passes every parameter as
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 |
sql adapter passes every parameter as
|
|
| Adam Roderick 2007-02-01, 7:20 pm |
| I am using a SQL Send port to call a stored procedure. The parameters
include varchar, smalldatetime, and money data types. The SQL Transport
Schema Generator seems to have no problem generating a schema. It correctly
pulls the parameter names and data types from the database into the wizard,
and it creates a schema.
I first noticed a problem when all the data types in the schema were
xs:string. Even if I change the datatypes that are supposed to be datetime
to xs:datetime and the ones that are supposed to be money to xs:float, they
are passed as nvarchar. I can view the exec command in SQL profiler as it
runs, and every parameter is passed in as varchar. So of course SQL returns
an error to BizTalk that ends up in the event log that says it cannot convert
nvarchar to money datatype (or float datatype, as I later attempted).
I can get it to *work* by changing all the parameters in the stored
procedure to varchar and then doing some casts or converts before performing
the insert or update into the tables. But this just does not feel like the
right way to do it.
Can anyone help me figure out why the SQL Adapter will not pass parameters
other than nvarchar?
| |
| Jan Eliasen 2007-02-09, 7:17 pm |
| On Thu, 1 Feb 2007 15:23:01 -0800, Adam Roderick
<--nospam--aroder@gmail.com> wrote:
>I can get it to *work* by changing all the parameters in the stored
>procedure to varchar and then doing some casts or converts before performing
>the insert or update into the tables. But this just does not feel like the
>right way to do it.
For the money type, I believe you just need to send "$34.00" instead
of "34.00".
--
eliasen, representing himself and not the company he works for.
Private blog: http://blog.eliasen.dk
Private email: jan@eliasen.dk
| |
| Adam Roderick 2007-02-09, 7:17 pm |
| Thanks for the response. I will try that. Any ideas on why the parameters
are all passed as nvarchar? What is the point of the wizard pulling the
datatypes from the stored procedure and setting values/NULL in the wizard?
"Jan Eliasen" wrote:
> On Thu, 1 Feb 2007 15:23:01 -0800, Adam Roderick
> <--nospam--aroder@gmail.com> wrote:
>
> For the money type, I believe you just need to send "$34.00" instead
> of "34.00".
>
> --
> eliasen, representing himself and not the company he works for.
>
> Private blog: http://blog.eliasen.dk
>
> Private email: jan@eliasen.dk
>
| |
| Jan Eliasen 2007-02-11, 7:16 pm |
| On Fri, 9 Feb 2007 13:41:01 -0800, Adam Roderick
<--nospam--aroder@gmail.com> wrote:
>Thanks for the response. I will try that. Any ideas on why the parameters
>are all passed as nvarchar? What is the point of the wizard pulling the
>datatypes from the stored procedure and setting values/NULL in the wizard?
Well, the SP can ot run unless it has some values for all the
parameters. And if the SP can not be run, the wizard will not get any
data back, from which to create a schema.
--
eliasen, representing himself and not the company he works for.
Private blog: http://blog.eliasen.dk
Private email: jan@eliasen.dk
|
|
|
|
|