?
Solved

MSSQL Updategram

Posted on 2002-05-20
10
Medium Priority
?
292 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
Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

 

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

TCP/IP Network Protocol Cheat Sheet

TCP/IP is a set of network protocols which is best known for connecting the machines that make up the Internet. The truth is that TCP/IP is one of the oldest network protocols and its survival is mainly based on its simplicity and universality.

Question has a verified solution.

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

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

770 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