|
|
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
SyBase ASE 12.5 создал для теста типов ХП Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. OleDbCommandBuilder.DeriveParameters() RETURN_VALUE Direction: ReturnValue OleDbType: Integer DbType: Int32 FDecimal_4_0 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_4_2 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_5_0 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_5_2 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_8_0 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_8_2 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_9_0 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_9_2 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_10_0 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_10_2 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_18_0 Direction: Input OleDbType: Numeric DbType: Decimal FDecimal_18_2 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_4_0 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_4_2 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_5_0 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_5_2 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_8_0 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_8_2 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_9_0 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_9_2 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_10_0 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_10_2 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_18_0 Direction: Input OleDbType: Numeric DbType: Decimal FNumeric_18_2 Direction: Input OleDbType: Numeric DbType: Decimal FMoney Direction: Input OleDbType: Currency DbType: Currency FDecimal_4_0_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_4_2_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_5_0_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_5_2_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_8_0_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_8_2_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_9_0_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_9_2_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_10_0_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_10_2_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_18_0_out Direction: Output OleDbType: Numeric DbType: Decimal FDecimal_18_2_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_4_0_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_4_2_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_5_0_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_5_2_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_8_0_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_8_2_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_9_0_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_9_2_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_10_0_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_10_2_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_18_0_out Direction: Output OleDbType: Numeric DbType: Decimal FNumeric_18_2_out Direction: Output OleDbType: Numeric DbType: Decimal FMoney_out Direction: Output OleDbType: Currency DbType: Currency вызываю Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. OverflowException.Message Value was either too large or too small for a Currency. хотя refman1.pdf money Денежные величины в диапазоне от +922 337 203 685 477,5807 до -922 337 203 685 477,5808 фиг с тобой, золотая рыбка, - меняю Код: plaintext 1. OleDbException.Message [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '9999.99' to a DECIMAL field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '99999.99' to a DECIMAL field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '99999999.99' to a DECIMAL field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '999999999.99' to a DECIMAL field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '9999999999.99' to a DECIMAL field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '1000000000000000000' to a DECIMAL field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '9999.99' to a NUMERIC field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '99999.99' to a NUMERIC field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '99999999.99' to a NUMERIC field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '999999999.99' to a NUMERIC field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '9999999999.99' to a NUMERIC field . [Native Error code: 247] [DataDirect ADO Sybase Provider] Arithmetic overflow during implicit conversion of NUMERIC value '1000000000000000000' to a NUMERIC field . Сакраментальный вопрос: Кто виноватЪ? Что делатЪ? _________________ "Helo, word!" - 17 errors 56 warnings ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.03.2005, 10:49 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
сорри... забыл-недоглядел :( numeric(4,2) - это ж 99.99, а не 9999.99 money тоже заборол: Код: plaintext 1. осталось тока записать данные с десятичной частью: на Код: plaintext 1. [Native Error code: 241] [DataDirect ADO Sybase Provider] Scale error during implicit conversion of NUMERIC value '99.99' to a NUMERIC field. целое - пишет, а фот 99.99 - не хочет... типами баловался (пробовал OleDbType.Decimal), 99.99 к decimal'у приводил - шо мертвому припарки... Ж8-/ вагон бубнов пАлАмАл Как же, все-таки, записать-передать десятичное (валидное по типу) значение в numeric(precision, scale) (decimal(precision, scale)) _________________ "Helo, word!" - 17 errors 56 warnings ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.03.2005, 15:28 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
Таки заборол: Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. но это ж изврат!!! Ж8-/ а если структура БД поменяется??? "...Вот уроды..." х/ф "Брат-2" (c) _________________ "Helo, word!" - 17 errors 56 warnings ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 23.03.2005, 16:14 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
А ты структуру базы бери из базы: Код: plaintext 1. 2. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.03.2005, 18:41 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
2 Alexander Kadirov Можно поподробнее, как для SyBase ASE 12.5 это будет выглядеть ??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.03.2005, 18:46 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
__guest2 Alexander Kadirov Можно поподробнее, как для SyBase ASE 12.5 это будет выглядеть ??? А вот для sybase, хрен его знает. Не изучал. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.03.2005, 20:43 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
Жаль :( Вопрос (и весь тред) был именно по SyBase ASE 12.5 --------------------- Как-то странно - отвечу что знаю, а не о чём спрашивают... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.03.2005, 21:55 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
Поскольку все выполняется посредством ХП, то все решилось очень красиво посредством OleDbCommandBuilder.DeriveParameters - возвращается все, что необходимо... Остается только заполнить Parameters.Value для тех, у кого ParameterDirection.Input... _________________ "Helo, word!" - 17 errors 56 warnings ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.04.2005, 18:41 |
|
||
|
data types .NET vs OleDb
|
|||
|---|---|---|---|
|
#18+
Вторая часть марлезонского балета Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. передаю, как видите 13 , а получаю взад 0.000013 (как для double, так и для decimal). Каких @#$% ему еще не хватает? Что еще ната покрутить-подкрутить? _________________ "Helo, word!" - 17 errors 56 warnings ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 24.04.2005, 01:30 |
|
||
|
|

start [/forum/topic.php?fid=17&msg=33009207&tid=1353766]: |
0ms |
get settings: |
10ms |
get forum list: |
18ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
48ms |
get topic data: |
8ms |
get forum data: |
4ms |
get page messages: |
45ms |
get tp. blocked users: |
2ms |
| others: | 241ms |
| total: | 382ms |

| 0 / 0 |
