Solved

MSSQL Updategram

Posted on 2002-05-20
10
287 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
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
read PayflowPro reports using the report metadata using perl 11 40
json format text only 4 82
Formatting issues in XSL FO 3 37
AL3 Files 4 27
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 …
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

815 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

9 Experts available now in Live!

Get 1:1 Help Now