Solved

MSSQL Updategram

Posted on 2002-05-20
10
289 Views
Last Modified: 2006-11-17
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
0
Comment
Question by:greenrc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
10 Comments
 

Author Comment

by:greenrc
ID: 7021871
up the points go!
0
 

Author Comment

by:greenrc
ID: 7023161
up the points go again!
0
 
LVL 27

Expert Comment

by:BigRat
ID: 7023982
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:greenrc
ID: 7024032
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
 
LVL 27

Expert Comment

by:BigRat
ID: 7024099
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
 

Author Comment

by:greenrc
ID: 7024126
We had a laugh about needing a 'us' in front earlier today ;)

Hope someone can shead some light

Thanks for your time.
0
 

Author Comment

by:greenrc
ID: 7273958
Have resolved this myself using a schema to define the field.


How do i release the points.
0
 
LVL 27

Expert Comment

by:BigRat
ID: 7298474
Post a question in community support asking for this question to be deleted and get a refund. I have no objection.
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11702794
PAQed, with points refunded (300)

modulo
Community Support Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SharePoint 2013 Blog Template 2 64
XSL-FO - show results in 2 columns 5 33
Configure a Bean in an XML file 4 49
Why is PHP Storm giving me an undefined constant error? 4 39
The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question