# Data type money/currency cannot be retourned in DA command

**URL:** https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220
**Category:** Data Abstract
**Tags:** net, delphi
**Created:** [September 22, 2025, 4:00pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220 "2025-09-22T16:00:06Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [September 22, 2025, 4:00pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/1 "2025-09-22T16:00:06Z")

</div>

We have a DA command in a .NET server that returns a parameter of type currency.

However this variant parameter cannot be read as a currency in delphi.

It appears to be a byte array.

How do you return an MSSQL DB type money via a DA command to a delphi client

![image](https://talk.remobjects.com/uploads/default/original/3X/4/d/4d8f590f2f56f0e361d0b0862b8a1dfcfb659874.png)

 ![image](https://talk.remobjects.com/uploads/default/original/3X/f/1/f17ff9c424737aa92831243b518d5c2f6087581f.png)

 ![image](https://talk.remobjects.com/uploads/default/original/3X/8/8/8825f22a0b9e53bd12c82a1700b4d13f8f0fb9c3.png)

 ![image](https://talk.remobjects.com/uploads/default/original/3X/9/2/920abfca25e0201f62d7a01b10206723541b749c.png)

 ![image](https://talk.remobjects.com/uploads/default/original/3X/9/d/9ddc0c7854e1a95aa5711c63b3853860bfeacd8b.png)

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [September 22, 2025, 4:03pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/2 "2025-09-22T16:03:42Z")

</div>

FYI: Another small inconvenience in the schema modeler is that when you change the select SQL statement above he asks to update the parameters and he changes the direction of all the output parameters (to input)

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [September 27, 2025, 12:11pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/3 "2025-09-27T12:11:22Z")

</div>

Hi,

> [@fvancrae](#):
>
> It appears to be a byte array.

**EDIT:**  
This is as expected. .NET uses Decimal for Currency type so when it writes Variant value, it converts Decimal to Variant.

On Delphi side you can convert variant to Decimal with `VariantToDecimal` and later `DecimalToBCD` & `BCDToCurrency` or call `VariantToBCD` & `BCDToCurrency` methods

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [September 27, 2025, 12:13pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/4 "2025-09-27T12:13:48Z")

</div>

> [@fvancrae](#):
>
> FYI: Another small inconvenience in the schema modeler is that when you change the select SQL statement above he asks to update the parameters and he changes the direction of all the output parameters (to input)

Logged as [bugs://D19589](https://www.remobjects.com/portal/bugs/?id=D19589).

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [October 6, 2025, 9:20am UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/5 "2025-10-06T09:20:29Z")

</div>

Hi,

> [@fvancrae](#):
>
> FYI: Another small inconvenience in the schema modeler is that when you change the select SQL statement above he asks to update the parameters and he changes the direction of all the output parameters (to input)

Can you give an example of such sql statement, pls?

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [October 6, 2025, 12:01pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/6 "2025-10-06T12:01:35Z")

</div>

Yes, the SQL from thes screenshot had it

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [October 6, 2025, 1:18pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/7 "2025-10-06T13:18:55Z")

</div>

Hi,

why do you want to consume select request as a set of parameters and not as usual fields?

---

<div class="post-metadata">

### Author: ![fvancrae](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/f/ad7895/32.png) [@fvancrae](https://talk.remobjects.com/u/fvancrae)
#### Post date: [October 13, 2025, 12:38pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/8 "2025-10-13T12:38:30Z")

</div>

I don’t understand your question.

In our code (historically) queries that return only a single record (and which don’t need updating) are typically implemented via commands.

What other approach do you suggest?

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [October 13, 2025, 2:08pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/9 "2025-10-13T14:08:10Z")

</div>

Hi,

Thx, for clarification.  
by default, you can’t create Select statement in Commands so I’ve messed Tables and Command nodes.

Now I understand the issue but I don’t think that we can easily detect parameter’s direction but we can keep type/size/direction for known parameters.

btw, for tables (i.e. select sql) you can receive money type as currency, but for commands - all parameter values are passed as Variant from server to client so you have received money type as Variant (decimal is stored into variant as array of byte).

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [October 27, 2025, 3:17pm UTC](https://talk.remobjects.com/t/data-type-money-currency-cannot-be-retourned-in-da-command/32220/10 "2025-10-27T15:17:07Z")

</div>

[bugs://D19589](https://www.remobjects.com/portal/bugs/?id=D19589) was closed as fixed.
