Solved

MSSQL Updategram

Posted on 2002-05-20
10
285 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
  • 5
  • 3
10 Comments
 

Author Comment

by:greenrc
Comment Utility
up the points go!
0
 

Author Comment

by:greenrc
Comment Utility
up the points go again!
0
 
LVL 27

Expert Comment

by:BigRat
Comment Utility
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
 

Author Comment

by:greenrc
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 27

Expert Comment

by:BigRat
Comment Utility
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
Comment Utility
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
Comment Utility
Have resolved this myself using a schema to define the field.


How do i release the points.
0
 
LVL 27

Expert Comment

by:BigRat
Comment Utility
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
Comment Utility
PAQed, with points refunded (300)

modulo
Community Support Moderator
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
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. 
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now