|
|
|
Создание DBF через ODBC: размерность полей
|
|||
|---|---|---|---|
|
#18+
Задача: Создается таблица DBF (через ODBC) посылкой SQL-запроса "CREATE TABLE ...". Типы полей, указываемые в запросе, разные: TEXT, LONG, DOUBLE. Вопрос: Как для полей LONG, DOUBLE указать размерность? Для DOUBLE нужно указать и число знаков после запятой. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 29.04.2004, 21:24 |
|
||
|
Создание DBF через ODBC: размерность полей
|
|||
|---|---|---|---|
|
#18+
Господа специалисты по SQL, ну помогите, плиз. Почему не проходит в SQL-запросе CREATE TABLE указание точности: NUMERIC(5) или FLOAT(3) ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.04.2004, 14:20 |
|
||
|
Создание DBF через ODBC: размерность полей
|
|||
|---|---|---|---|
|
#18+
Ну потому что драйвер такой. Не поддерживает указание размера для числовых полей. И даже честно рассказывает об этом функцией SQLGetTypeInfo(). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.04.2004, 14:51 |
|
||
|
Создание DBF через ODBC: размерность полей
|
|||
|---|---|---|---|
|
#18+
Видимо пользуетесь DBASE IV драйвером > dBASE Data Types The following table shows how dBASE data types are mapped to ODBC SQL data types. Note that not all ODBC SQL data types are supported. Код: plaintext 1. 2. 3. 4. 5. 6. 7. [1] Valid only for dBASE version 5.x Precision in dBASE III allows numbers with up to two-digit exponents and in dBASE IV numbers with up to three-digit exponents. Because numbers are stored as text, they are converted to numbers. If the number to convert does not fit in a field, unexplained results may occur. While dBASE allows a precision and a scale to be specified with a NUMERIC data type, it is not supported by the ODBC dBASE driver. The ODBC dBASE driver always returns a precision of 15 and a scale of 0 for a NUMERIC data type. A column created with the Numeric data type using the ODBC dBASE driver maps to the SQL_DOUBLE ODBC data type. Thus the data in this column is subject to rounding. This behavior is not the same as that of the NUMERIC data type in dBASE (type N), which is Binary Coded Decimal (BCD). > У меня какой тип поля не выбирай при create table LONG ли DOUBLE - это всегда будет DECIMAL(20,5). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.04.2004, 15:00 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=32503538&tid=2035026]: |
0ms |
get settings: |
10ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
68ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
49ms |
get tp. blocked users: |
2ms |
| others: | 222ms |
| total: | 388ms |

| 0 / 0 |
