MSSQL Updategram

Here is my updategram:

<?xml version="1.0" ?>
<root xmlns:updg="urn:schemas-microsoft-com:xml-updategram">
<updg:sync>
<before>
  <msj_currency_v2 currencyID="1" currencyName="US dollar" currencySymbol="s" currencyStatus="1" />
</before>
<after>
  <msj_currency_v2 currencyID="1" currencyName="US dollar" currencySymbol="$" currencyStatus="1" />
</after>
</updg:sync>
</root>

I am posting it into the following MSSQL table:

currencyID     int     4
currencyName     varchar     100
currencySymbol     varchar     3
currencyStatus     int     4

The updategram errors when currencySymbol="$".

The error via VB test app:

"disallowed implicit conversion from datatype money to datatype varchar .. use the convert function to run this query."

How do i run the "convert function" inside an updategram????

Or is a schema required .. if so can you please provide.

Thanks
greenrcAsked:
Who is Participating?
 
moduloConnect With a Mentor Commented:
PAQed, with points refunded (300)

modulo
Community Support Moderator
0
 
greenrcAuthor Commented:
up the points go!
0
 
greenrcAuthor Commented:
up the points go again!
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
BigRatCommented:
No idea, looks OK to me.

But, the namespace is not the default namespace. Don't you need to then say <updg:before> and <updg:after>?
0
 
greenrcAuthor Commented:
i must have omitted <updg:before> and <updg:after>

The problem is posting a "$" into a varchar field via an updategram ... MSSQL tries to convert it to datatype money and errors.

If i post "A$" or "$u" the updategram works fine.
0
 
BigRatCommented:
If MSSQL doesn't want to accept $ could it be that US$ is actually wanted and that they finally have got the localids sorted? No, I don't really know, sorry.
0
 
greenrcAuthor Commented:
We had a laugh about needing a 'us' in front earlier today ;)

Hope someone can shead some light

Thanks for your time.
0
 
greenrcAuthor Commented:
Have resolved this myself using a schema to define the field.


How do i release the points.
0
 
BigRatCommented:
Post a question in community support asking for this question to be deleted and get a refund. I have no objection.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.