Содержание
- iBase.ru Forum
- conversion error from string » «
- conversion error from string » «
- Confusing message (conversion error from STRING » «) when use parametrized ES and «?» has no explicit CAST() [CORE6463] #6696
- Comments
- Footer
- «conversion error from string» after change of field type from BIGINT to VARCHAR(21) [CORE3045] #3426
- Comments
- ODBC 3146 Error for Some Users (1 Viewer)
- oumahexi
- conversion error from string firebird
- 1 ответ
- 1 Answer 1
iBase.ru Forum
Форум по InterBase, Firebird и Yaffil
- Темы без ответов
- Активные темы
- Поиск
- Наша команда
conversion error from string » «
Модераторы: kdv, dimitr
conversion error from string » «
Сообщение DastiX » 27 янв 2010, 04:35
Доброго времени суток)
Совсем недавно начал изучение Firebird, по этому если что не так — не судите строго.
Собственно сабж.
Есть firebird 2.0 WI-V2.0.1.12855, работает на VMware 6.5, WinXP 32bit.
Через IBExpert созданы три таблицы: одна главная и две подчиненные.
К примеру главная ФИРМЫ и подчиненные ЛЮДИ и ТЕХНИКА.
Хочу соответственно, что бы одной строке в главной соответствовало несколько строк в подчиненной.
Т.е. в главной таблице ФИРМЫ есть поле ЛЮДИ, и поле ТЕХНИКА типа INTEGER;
Бегаем по фирмам -> отображаются только те люди и техника, которые относятся к этой фирме.
Так вот. Создаю в главной таблице два уникальных поля типа INTEGER, пытаюсь ввести данные — все ок.
В каждой подчиненной по одному полю для внешнего ключа.
Назначаю внешний ключ в таблице ЛЮДИ — все ок. Ввожу данные в поле ЛЮДИ в таблице ФИРМЫ — ок,
в IBExpert можно посмотреть через MasterDetail что определенной фирме соответствует определенный список людей.
И тут самое интересное, назначаю внешний ключ в таблице ТЕХНИКА, все прокатывает.
Но как только пытаюсь ввести данные в главной таблице, в поле ТЕХНИКА появляется ошибка
> хотя ввожу число.
Дальше интереснее. Удаляю из таблицы ТЕХНИКА внешний ключ(индекс) — ок.
Пытаюсь удалить ограничение на уникальность поля ТЕХНИКА в таблице ФИРМЫ, создается тразакция, все ок, нажимаю Commit,
и получаю deadlock. Хотя вроде все закрыто.
Пробую еще раз и получаю сообщение
>
После этого IBExpert зависает при закрытии, а при принудительном завершении соответственно отчет об ошибке.
Переоткрываю и удалю ограничение на уникальность.
В может быть тут дело не пойму. Откуда эта ошибка неизвестно.
Сколько уже написал, надеюсь кто-нибудь прочитает. заранее спасибо за ответы.
Источник
Confusing message (conversion error from STRING » «) when use parametrized ES and «?» has no explicit CAST() [CORE6463] #6696
set sqlda_display on;
set term ^;
execute block returns(o_rel_id int) as
begin
execute statement (‘select iif(1
The text was updated successfully, but these errors were encountered:
«One need to know in advance that NULL w/o CAST() is considered as CHAR(1)», why do you think that is the case? As far as I know it shouldn’t have any type in this situation. It looks to me like the behaviour in 2.5 is correct (where it cannot infer the datatype), and the behavior in 3.0 and 4.0 is wrong.
Instead, it looks to me that maybe the datatype is inferred as SQL_NULL, which shouldn’t be usable in this context, which is then coerced to a string which is then not convertible to an integer.
> why do you think that is the case? // char(1)
Because when i explicitly cast NULL to required datatype (int) then all works fine:
set term ^;
execute block returns(o_rel_id int) as
begin
execute statement (‘select iif(1 Statement failed, SQLSTATE = 22018 / conversion error from string » »
2) execute statement (‘select iif(1 all OK.
Here we can see nothing about cast parameters («?»); rather it’s about cast NULL literal 🙂
As I said in my previous comment, it looks like the second parameter is inferred as type SQL_NULL, which isn’t usable in this context. When the parameter is then assigned, it gets the value ‘not null’ instead of 3, that is then coerced to a string which is then not convertible to an integer. The behaviour of 2.5 should probably be retained in this case, or at least SQL_NULL should not be allowed in this context.
I have confirmed this by preparing the statement select iif(1
The reason the cast works, is that changes the inference of the parameter to SQL_LONG instead of SQL_NULL (just as would have been if you used iif(1
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
«conversion error from string» after change of field type from BIGINT to VARCHAR(21) [CORE3045] #3426
Submitted by: Simeon Bodurov (simeon.bodurov)
Is related to CORE1432
Is related to QA441
I had altered type of filed in our database from BIGINT to VARCHAR(21). After alter table I was unable to do selects from this table if select clause contained string value in equals expression over this field. After backup and restore the selects worked. But this was not an option for our database upgrade script. So we were forced to create new VARCHAR field, copy values from BIGINT to VARCHAR field, drop BIGINT filed and rename the second field to original name.
I have created script that simulates the problem.
SET SQL DIALECT 3;
CREATE DATABASE ‘localhost:C:test.fdb’ USER ‘SYSDBA’ PASSWORD ‘masterkey’;
CONNECT ‘localhost:C:test.fdb’ USER ‘SYSDBA’ PASSWORD ‘masterkey’;
CREATE TABLE TEST1(
ID INTEGER,
TEST_FIELD BIGINT,
INSERT INTO TEST1(ID, TEST_FIELD)
VALUES(1, 234);
ALTER TABLE TEST1
ALTER TEST_FIELD TYPE VARCHAR(21);
SELECT ID, TEST_FIELD
FROM TEST1
WHERE TEST_FIELD = ‘A’;
expected result:
empty result set
actual result:
ID TEST_FIELD
============ =====================
Statement failed, SQLCODE = -413
conversion error from string «A»
After line 26 in file test.sql
The text was updated successfully, but these errors were encountered:
Источник
ODBC 3146 Error for Some Users (1 Viewer)
oumahexi
Free Range Witch
My apologies for another posting so soon after the last. My problem is an inherited database that just does not behave.
The latest error is the ODBC 3146 (Error occurred report could not be checked). This error occurs when a user tries to run a report.
Our system collects data via Access 2002 into fields that are linked to SQL Server 2000, the information is then passed back into Access to run the required reports. The reason for this is that the original database relied on Access information being fed in from an external source. The source changed to SQL while our database was in it’s infancy, but management decided that rather than rebuild from scratch it would be best to patch the old system up
I know there are many queries in the database which query a query for no apparent reason — example:
qryThisQuery interrogates qry_tblThisQuery (selecting all fields from this query), qry_tblThisQuery interrogates dbotblThisQuery (selecting all fields from the table).
My first thought about the ODBC errors being experienced is that there are too many scenarios like this and it limits the efficiency of the database. However, my hands are tied, I am only permitted to patch it up.
My second thought is that perhaps the user needs her registry cleaned out? or perhaps there may be too much junk in her temp folder? The big problem is that it works on my pc and another user’s pc but not on the third.
Источник
conversion error from string firebird
В настоящее время я работаю над проектом, который позволяет импортировать данные из файла Excel. Я использую программу RazorSQL. Но каждый раз, когда я начинаю импорт,
Код ошибки ISC 335544334 ->
Использует ли Firebird некоторые специальные форматы даты? Мне действительно нужен ответ, это очень важно. Эта проблема заставляет меня ждать, чтобы продолжить работу.
sql import excel firebird razorsql
1 ответ
1 Решение Mark Rotteveel [2018-08-16 16:09:00]
Сообщение об ошибке указывает, что Firebird попытался преобразовать значение строки 2002-07-07 22:00:00.000 в тип данных, отличный от CHAR / VARCHAR и не удалось, потому что строковое значение недействительно для целевого типа данных. Формат, как показано, будет правильно преобразован в TIMESTAMP , а это значит, что вы назначаете это либо неправильному столбцу, либо столбец имеет неправильный тип. Например, DATE не имеет компонента времени на диалекте 3, поэтому преобразование строки с компонентом времени завершится неудачей с этой ошибкой, так же как и преобразование в числовой столбец ( INTEGER , BIGINT и т.д.).
Без дополнительной информации о соответствующих столбцах и точном способе импорта невозможно предоставить более конкретный ответ.
I am currently working on a project which allows you to import data from an Excel file. I use the Programm RazorSQL. But every time I start the import, the
ISC error code 335544334 occures ->
Does Firebird use some special Date formats? I really need an answer, it’s very important. This problem keeps me waiting to continue with my work.
1 Answer 1
The error message indicates that Firebird tried to convert the string value 2002-07-07 22:00:00.000 to a datatype other than CHAR / VARCHAR and did not succeed because the string value is invalid for the target datatype. The format as shown will correctly convert to a TIMESTAMP , which means that you are assigning this either to the wrong column, or the column has the wrong type. For example, a DATE has no time component in dialect 3, so converting a string with a time component will fail with this error, as will converting to a numerical column ( INTEGER , BIGINT , etc).
Without more information about the columns involved and the exact method of import, it is not possible to provide a more specific answer.
Сейчас я работаю над проектом, который позволяет импортировать данные из файла Excel. Я использую Programm RazorSQL. Но каждый раз, когда я начинаю импорт, в
ISC код ошибки 335544334 встречается, ->
Используют ли Firebird некоторых специальных форматов даты? Я действительно нужен ответ, это очень важно. Эта проблема заставляет меня ждать, чтобы продолжить свою работу .
Сообщение об ошибке указывает на то, что Firebird пытался преобразовать строковое значение 2002-07-07 22:00:00.000 в тип данных, кроме CHAR / VARCHAR и не увенчались успехом , поскольку значение строки является недействительным для целевого типа данных. Формат , как показано правильно преобразовать к TIMESTAMP , что означает , что вы назначаете это либо к неправильному столбца, или столбец имеет неправильный тип. Например, DATE не имеет времени компонент в диалекте 3, так что преобразование строки с временным компонентом потерпит неудачу с этой ошибкой, как будет преобразовывать в числовой колонке ( INTEGER , BIGINT и т.д.).
Без дополнительной информации о столбцах, участвующих и точный метод импорта, это не представляется возможным дать более конкретный ответ.
Источник
Модераторы: kdv, dimitr
-
DastiX
- Сообщения: 1
- Зарегистрирован: 27 янв 2010, 03:47
conversion error from string » «
Доброго времени суток)
Совсем недавно начал изучение Firebird, по этому если что не так — не судите строго.
Собственно сабж.
Есть firebird 2.0 WI-V2.0.1.12855, работает на VMware 6.5, WinXP 32bit.
Через IBExpert созданы три таблицы: одна главная и две подчиненные.
К примеру главная ФИРМЫ и подчиненные ЛЮДИ и ТЕХНИКА.
Хочу соответственно, что бы одной строке в главной соответствовало несколько строк в подчиненной.
Т.е. в главной таблице ФИРМЫ есть поле ЛЮДИ, и поле ТЕХНИКА типа INTEGER;
Бегаем по фирмам -> отображаются только те люди и техника, которые относятся к этой фирме.
Так вот. Создаю в главной таблице два уникальных поля типа INTEGER, пытаюсь ввести данные — все ок.
В каждой подчиненной по одному полю для внешнего ключа.
Назначаю внешний ключ в таблице ЛЮДИ — все ок. Ввожу данные в поле ЛЮДИ в таблице ФИРМЫ — ок,
в IBExpert можно посмотреть через MasterDetail что определенной фирме соответствует определенный список людей.
И тут самое интересное, назначаю внешний ключ в таблице ТЕХНИКА, все прокатывает.
Но как только пытаюсь ввести данные в главной таблице, в поле ТЕХНИКА появляется ошибка
<<Overflow occurred durig data type conversion
conversion error from string » »
[00543BBF]>> хотя ввожу число.
Дальше интереснее. Удаляю из таблицы ТЕХНИКА внешний ключ(индекс) — ок.
Пытаюсь удалить ограничение на уникальность поля ТЕХНИКА в таблице ФИРМЫ, создается тразакция, все ок, нажимаю Commit,
и получаю deadlock. Хотя вроде все закрыто….
Пробую еще раз и получаю сообщение
<<This operation is not defined for system tables.
unsuccessful metadata update.
object INDEX is in use.
Changes will be rolled back…>>
После этого IBExpert зависает при закрытии, а при принудительном завершении соответственно отчет об ошибке.
Переоткрываю и удалю ограничение на уникальность…
В может быть тут дело не пойму. Откуда эта ошибка неизвестно…
Сколько уже написал, надеюсь кто-нибудь прочитает…заранее спасибо за ответы….
-
kdv
- Forum Admin
- Сообщения: 6595
- Зарегистрирован: 25 окт 2004, 18:07
Re: conversion error from string » «
Сообщение
kdv » 27 янв 2010, 18:20
conversation — это общение. conversion — конверсия, конвертация. Исправил.
По сути — либо сообщение не то из-за неправильного firebird.msg (результат установки разных версий IB/ФБ на одном компе), либо действительно раньше было char/varchar, а потом поменяли на integer, или наоборот.
Если второе, то это обычно следствие модификации структуры таблиц, наполненных данными. Причем не просто модификации, а из IBExpert.
Рекомендую извлечь скрипт БД, создать из него базу по новой, причем обновить ФБ, а то 2.0.1 как то не очень, и перелить данные из старой покоцанной БД в новую.
Comments
Submitted by: @pavel-zotov
Run this on 2.5, 3.x and 4.x:
set sqlda_display on;
set term ^;
execute block returns(o_rel_id int) as
begin
execute statement (‘select iif(1 <= ?, ?, null) from rdb$database’) (2, 3) into o_rel_id;
suspend;
end
^
set term ;^
Output:
1) on 2.5:
INPUT SQLDA version: 1 sqln: 10 sqld: 0
OUTPUT SQLDA version: 1 sqln: 20 sqld: 1
01: sqltype: 497 LONG Nullable sqlscale: 0 sqlsubtype: 0 sqllen: 4
: name: (8)O_REL_ID alias: (8)O_REL_ID
: table: (0) owner: (0)
============
Statement failed, SQLSTATE = HY004
Dynamic SQL Error
-SQL error code = -804
-Data type unknown
-At block line: 3, col: 5
2) on 3.x and 4.x:
INPUT message field count: 0
OUTPUT message field count: 1
01: sqltype: 496 LONG Nullable scale: 0 subtype: 0 len: 4
: name: O_REL_ID alias: O_REL_ID
: table: owner:
============
Statement failed, SQLSTATE = 22018
conversion error from string » «
-At block line: 3, col: 5
One need to know in advance that NULL w/o CAST() is considered as CHAR(1), but i could not find this in the $FB_HOME/doc/* and in https://www.firebirdsql.org/file/documentation/html/en/firebirddocs/nullguide/firebird-null-guide.html
Phrase: conversion error from string » » — definitely looks weird (there is no any text variables / parameters in this example).
Perhaps, it will be better to change this message back to 2.5.x ?
Commented by: @mrotteveel
«One need to know in advance that NULL w/o CAST() is considered as CHAR(1)», why do you think that is the case? As far as I know it shouldn’t have any type in this situation. It looks to me like the behaviour in 2.5 is correct (where it cannot infer the datatype), and the behavior in 3.0 and 4.0 is wrong.
Instead, it looks to me that maybe the datatype is inferred as SQL_NULL, which shouldn’t be usable in this context, which is then coerced to a string which is then not convertible to an integer.
Commented by: @pavel-zotov
> why do you think that is the case? // char(1)
Because when i explicitly cast NULL to required datatype (int) then all works fine:
set term ^;
execute block returns(o_rel_id int) as
begin
execute statement (‘select iif(1 <= ?, ?, cast(null as int) ) from rdb$database’) (2, 3) into o_rel_id;
suspend;
end
^
INPUT message field count: 0
OUTPUT message field count: 1
01: sqltype: 496 LONG Nullable scale: 0 subtype: 0 len: 4
: name: O_REL_ID alias: O_REL_ID
: table: owner:
============
3
PS.
Maybe subject of this ticket is also confusing as null cast/missed cast…
Once again:
1) execute statement (‘select iif(1 <= ?, ?, null) from rdb$database’) (2, 3) into o_rel_id; ==> Statement failed, SQLSTATE = 22018 / conversion error from string » «
2) execute statement (‘select iif(1 <= ?, ?, cast(null as int) ) from rdb$database’) (2, 3) into o_rel_id; ==> all OK.
Here we can see nothing about cast parameters («?»); rather it’s about cast NULL literal
Commented by: @mrotteveel
As I said in my previous comment, it looks like the second parameter is inferred as type SQL_NULL, which isn’t usable in this context. When the parameter is then assigned, it gets the value ‘not null’ instead of 3, that is then coerced to a string which is then not convertible to an integer. The behaviour of 2.5 should probably be retained in this case, or at least SQL_NULL should not be allowed in this context.
I have confirmed this by preparing the statement select iif(1 <= ?, ?, cast(null as int) ) from rdb$database using Jaybird, and checking the type of the second parameter, which is 32767, or a (nullable) SQL_NULL.
Commented by: @mrotteveel
The reason the cast works, is that changes the inference of the parameter to SQL_LONG instead of SQL_NULL (just as would have been if you used iif(1 <= ?, cast(? as int), null)), that is because in an expression like iif(…, ?, VAL), the type of the parameter is inferred from the type of VAL, and if VAL is NULL, then it can only infer SQL_NULL (where in 2.5 it couldn’t derive a datatype, so it produced a datatype unknown error), unless you explicitly cast that null to an explicit type.
Repeating my check in Jaybird, the type of the second parameter is (nullable) SQL_LONG in both
select iif(1 <= ?, ?, cast(null as int)) from rdb$database
and
select iif(1 <= ?, cast(? as int), null) from rdb$database
1 participant
-
#1
Hello again
My apologies for another posting so soon after the last. My problem is an inherited database that just does not behave.
The latest error is the ODBC 3146 (Error occurred report could not be checked). This error occurs when a user tries to run a report.
Our system collects data via Access 2002 into fields that are linked to SQL Server 2000, the information is then passed back into Access to run the required reports. The reason for this is that the original database relied on Access information being fed in from an external source. The source changed to SQL while our database was in it’s infancy, but management decided that rather than rebuild from scratch it would be best to patch the old system up
I know there are many queries in the database which query a query for no apparent reason — example:
qryThisQuery interrogates qry_tblThisQuery (selecting all fields from this query), qry_tblThisQuery interrogates dbotblThisQuery (selecting all fields from the table).
My first thought about the ODBC errors being experienced is that there are too many scenarios like this and it limits the efficiency of the database. However, my hands are tied, I am only permitted to patch it up.
My second thought is that perhaps the user needs her registry cleaned out? or perhaps there may be too much junk in her temp folder? The big problem is that it works on my pc and another user’s pc but not on the third.
any thoughts? Very much appreciated.
Thanks
Ouma
-
#2
My first reaction when it works on some PCs but not on others is to check the route to the SQL Server DB from the failing PC. Is it the same as on the working ones.
Good luck
-
#3
you may be trapping the error and substituting your OWN message
error 3146 is
«ODBC Call failed»
perhaps the query is too complex etc, or took too long to return values
-
#4
Odbc
My first reaction when it works on some PCs but not on others is to check the route to the SQL Server DB from the failing PC. Is it the same as on the working ones.
Good luck
That sounds like it Rabbie, it has to be to do with the way the computers are set up. Thanks again. I’ll keep you posted if we find a solution.
-
#5
Trapped?
you may be trapping the error and substituting your OWN message
error 3146 is«ODBC Call failed»
perhaps the query is too complex etc, or took too long to return values
By trapping an erro and substituting our own do you mean like a public function has been created to display this message when error number 3146 is encountered? Fab, just what I need, more hidden code to find. Can someone please remind me why I applied for this job? It definately wasn’t for the money lol.
Thanks for the input Gemma.
-
#6
Did you ever find the solution to this as I am having the exact same issue? Some computers works fine others have this error
Banana
split with a cherry atop.
-
#7
Two things:
1) We’d need a bit more info on how end users connect to the server; using DSN or not? Has the comuter’s network changed recently? Is it within an office LAN? Has the backend been altered recently?
2) If you also have anything in form’s Error Event, comment it out to force Access’s default error message which will then display the actual error message. If you don’t know why, this is why.
OTOH, if the error occurs within a procedure inside the report’s module, use DAO.Errors collection to investigate the problem. (In fact, since you seem to know which query is the problem, you can write a quick temporary procedure to call that query and trap it so you can get more information from the backend about exactly what happened.)
HTH.
-
#8
I dont know if this helps but i ran a trace with odbc on the query and these are the lines that get the error message.
Code:
x macroSTARTUP 8c04-8c4c ENTER SQLExecDirectW
HSTMT 07CE3528
WCHAR * 0x0E2F2790 [ -3] "SELECT "HTRXTBL"."HTRX_TRX_DATE" FROM "HTRXTBL","ITEMTBL" WHERE ((((("HTRXTBL"."HTRX_REC_TYPE" = 'ITMSALE' ) AND ("HTRXTBL"."HTRX_TRX_DATE" >= {ts '28/08/2008'} ) ) AND ("HTRXTBL"."HTRX_TRX_DATE" <= {ts '1/09/2008'} ) ) AND ("HTRXTBL"."HTRX_AREA_NUMBER" = 3 ) ) AND ("ITEMTBL"."ITEM_NUMBER" = "HTRXTBL"."HTRX_ITEM_NUMBER" ) ) 0"
SDWORD -3
x macroSTARTUP 8c04-8c4c EXIT SQLExecDirectW with return code 0 (SQL_SUCCESS)
HSTMT 07CE3528
WCHAR * 0x0E2F2790 [ -3] "SELECT "HTRXTBL"."HTRX_TRX_DATE" FROM "HTRXTBL","ITEMTBL" WHERE ((((("HTRXTBL"."HTRX_REC_TYPE" = 'ITMSALE' ) AND ("HTRXTBL"."HTRX_TRX_DATE" >= {ts '28/08/2008'} ) ) AND ("HTRXTBL"."HTRX_TRX_DATE" <= {ts '1/09/2008'} ) ) AND ("HTRXTBL"."HTRX_AREA_NUMBER" = 3 ) ) AND ("ITEMTBL"."ITEM_NUMBER" = "HTRXTBL"."HTRX_ITEM_NUMBER" ) ) 0"
SDWORD -3
x macroSTARTUP 8c04-8c4c ENTER SQLFetch
HSTMT 07CE3528
x macroSTARTUP 8c04-8c4c EXIT SQLFetch with return code -1 (SQL_ERROR)
HSTMT 07CE3528
DIAG [HY000] [ODBC Firebird Driver][Firebird]conversion error from string "28/08/2008" (-413)
x macroSTARTUP 8c04-8c4c ENTER SQLErrorW
HENV 07CE1C18
HDBC 07CE32E8
HSTMT 07CE3528
WCHAR * 0x0013BB68 (NYI)
SDWORD * 0x0013BB34
WCHAR * 0x05692000
SWORD 4095
SWORD * 0x0013BB28
x macroSTARTUP 8c04-8c4c EXIT SQLErrorW with return code 0 (SQL_SUCCESS)
HENV 07CE1C18
HDBC 07CE32E8
HSTMT 07CE3528
WCHAR * 0x0013BB68 (NYI)
SDWORD * 0x0013BB34 (-413)
WCHAR * 0x05692000 [ 73] "[ODBC Firebird Driver][Firebird]conversion error from string "28/08/2008""
SWORD 4095
SWORD * 0x0013BB28 (73)
Any ideas?
-
#9
Ok got the actual error message as follows from the query i create
ODBC-CALL FAILED
ODBC Firebird Driver Firebird Conversion Error From string «29/07/2008» #-413
I know what the problem is, its the fact its formatting as dd/mm/yyyy where as firebird and this database need it formatted as mm/dd/yyyy which i have done in my code
now this works fine on my p.c with vista and a couple of others with xp but then not some others i am testing on.
-
#10
Nevermind guys figured it out, it was reading as a string not a date used CDate() in it and works fine now thank u
-
#11
now i’m relatively new to this access and vba but i got a spectacular error vba 3146. let me tell you the basics
|
THERE ARE FOUR MACHINES CONNECTED TO THE SERVER VIA FILE DSN
four users enter information via access 2007 to a MYSQL DATABASE
out of these four users, one user cant use one form on that access application
that form job is to generate what has been rejected to the user
(which means it connects to the database to find a rejected record and displays it )
the user then corrects the information and while updating sends this error
(vba ODBC, 3146)
the strange thing is error is particularly only happening to one user the others are fine and we’ve had this user move her seat and the error follows them. but the other users can connect and save no problem
this is weird to be with only 4 months experience
need help
i have checked to make sure she is entering the right format
no strings in integers etc etc
but strange…….. we cant find
it just fails to update but i believe the error should be the type of variable data to the fields
-
#12
DarnelleF,
You have joined a thread that is over 7 years old. ???????
From what I recall a 3146 error ODBC is only one of a series of errors.
You might want to review the errors collection and see what other errors may have occurred.
Found this related code(untested)
Code:
...other code here
.... the go here if err 3146
MyErrorTrap:
Dim errX As DAO.Error
Dim MyError As Error
If Errors.Count > 1 'This always seems to be 0, so no help
For Each errX In DAO.Errors 'These are empty even if dont check for Errors.Count
Debug.Print "ODBC Error"
Debug.Print errX.Number
Debug.Print errX.Description
Next errX
Else
Debug.Print "VBA Error"
Debug.Print Err.Number
Debug.Print Err.Description
End If
Good luck
-
#13
awesome i was now able to pin point the error!
ODBC Error
1062
[MySQL][ODBC 5.1 Driver][mysqld-5.1.46-community]Duplicate entry ‘\********************289421B289_526-2015.pdf’ for key ‘indPath’
the table its trying to update has a column called Path ( not indPath)
i had to censor the information but it contains the location of a file,etc
Sorry for posting on an old post
but any futher help will be greatly appreciated
but yet still im unsure what that means now
-
Summary
-
Files
-
Reviews
-
Support
-
Wiki
-
Mailing Lists
-
News
-
Code
-
Cvs
Menu
▾
▴
From: Adriano <fadri…@gm…> — 2006-07-19 20:49:27 |
I've this update query query = "UPDATE Fatture SET IntestazioneFattura = '" & TIntestazione.Text & "', Prestazione = '" & TPrestazione.Text & "', Speseimponibili = '" & ValSpeseImponibili & "', " & _ " Diritti = '" & ValDiritti & "', Onorari = '" & ValOnorari & "', Spesegenerali = '" & ValSpeseGenerali & "', CPA = '" & ValCassaPrev & "', TotaleImponibile = '" & ValTotaleImponibile & "', " & _ " Iva = '" & ValIva & "', Spesenonimponibili = '" & ValSpeseNonImponibili & "', TotaleFattura = '" & ValTotaleFattura & "', Ritenutaacconto = '" & ValRitenutaAcconto & "', " & _ " Totaledaversare = '" & ValTotaleVersare & "', Note = '" & TNote.Text & "', Giorno = '" & Calendar.Day & "', Mese = '" & Calendar.Month & "', Anno = '" & Calendar.Year & "', " & _ " Trimestre = '" & Trimestre & "', Pagamento = '" & Pagato & "', PraticaID = '" & txtFatturaPraticaID.Text & "' WHERE IdFattura = " + record + "" Some fields are BLOB field, other are integer value, other char, varchar. The query pass correctly the data but when execute that i receive the error in the subject Any hints ? Thanks Adriano |
From: bill lam <cbill…@gm…> — 2006-07-20 01:04:31 |
I think the problem is due to blob. The INSERT/UPDATE statements should be pass-thru to firebird for execution. The reason why it failed should be a problem of firebird engine but not odbc driver. I don't know the proper syntax but you may post to [firebird-support] list and asking how to insert/update blob fields using sql statement there. BTW, ms access allows updating blob using the syntax you have given if I remember correctly. -- regards, bill |
From: bill lam <cbill…@gm…> — 2006-07-20 06:12:15 |
Hi, Adriano: >> The reason why it failed should be a >> problem of firebird engine but not odbc driver. > The complete error message said > [odbc-firebird driver][firebird]conversion error from string "conversion error from string": fbodbc does not contain this error message, but you can find it inside firebird's "firebird.msg" file. So that the error did not come from odbc driver itself. use something like update t set blobimage=? where code='aaa' and then supply the parameter when being asked. I've not used VB for many years so I do not know the exact syntax, you may specifically ask "how to update a blob using vb dao/ado?" in the firebird-support list to see if anyone knows the exact syntax. -- regards, bill |
From: Georgi Varbanov <georg…@br…> — 2006-07-20 06:30:13 |
Hi I have had a similar problem with NUMERIC fields. I solved it with changing the field to DOUBLE or FLOAT. Regards, Georgi ----- Original Message ----- From: "Adriano" <fadri...@gm...> To: <fireb...@li...> Sent: Wednesday, July 19, 2006 11:49 PM Subject: [Firebird-odbc-devel] Conversion error from string run time error2147467259 > I've this update query > query = "UPDATE Fatture SET IntestazioneFattura = '" & > TIntestazione.Text & "', Prestazione = '" & TPrestazione.Text & "', > Speseimponibili = '" & ValSpeseImponibili & "', " & _ > " Diritti = '" & ValDiritti & "', Onorari = '" & ValOnorari & "', > Spesegenerali = '" & ValSpeseGenerali & "', CPA = '" & ValCassaPrev & > "', TotaleImponibile = '" & ValTotaleImponibile & "', " & _ > " Iva = '" & ValIva & "', Spesenonimponibili = '" & > ValSpeseNonImponibili & "', TotaleFattura = '" & ValTotaleFattura & > "', Ritenutaacconto = '" & ValRitenutaAcconto & "', " & _ > " Totaledaversare = '" & ValTotaleVersare & "', Note = '" & > TNote.Text & "', Giorno = '" & Calendar.Day & "', Mese = '" & > Calendar.Month & "', Anno = '" & Calendar.Year & "', " & _ > " Trimestre = '" & Trimestre & "', Pagamento = '" & Pagato & "', > PraticaID = '" & txtFatturaPraticaID.Text & "' WHERE IdFattura = " + > record + "" > > Some fields are BLOB field, other are integer value, other char, varchar. > The query pass correctly the data but when execute that i receive the > error in the subject > > Any hints ? > Thanks > Adriano > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Firebird-odbc-devel mailing list > Fireb...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-odbc-devel > |
From: Vladimir Tsvigun <pr…@hm…> — 2006-07-20 08:11:48 |
Hi Adriano, > Some fields are BLOB field, other are integer value, other char, varchar. > The query pass correctly the data but when execute that i receive the > error in the subject Please, send me ODBC trace log(zip) Probably I can specify issue. -- Best regards, Vladimir Tsvigun |
From: Vladimir Tsvigun <pr…@hm…> — 2006-07-20 08:11:49 |
Hi Georgi, > I have had a similar problem with NUMERIC fields. I solved it with changing > the field to DOUBLE or FLOAT. Please, send me ODBC trace log(zip) and sample small firebird database with table. and small App for example error. And no problem for fix issue :-) PS: Yes. I know that there is issue. But I need an example. -- Best regards, Vladimir Tsvigun |
From: Vladimir Tsvigun <pr…@hm…> — 2006-07-20 11:14:10 |
Hi Adriano, > where is located the log file? i've searched on all my pc without find it. > thank you very much 1) Press "Start" -> "Control panel" 2) run ODBC Administrator, select tab "Tracing" and press "Start Tracing Now" and select locate log file. 3) run App.exe >I've this update query query = "UPDATE Fatture SET IntestazioneFattura = '" & 4) select ODBC Administrator, select tab "Tracing" and press "Stop Tracing Now". 5) stop App.exe -- Best regards, Vladimir Tsvigun |
На чтение 3 мин. Просмотров 24 Опубликовано 15.12.2019
В настоящее время я работаю над проектом, который позволяет импортировать данные из файла Excel. Я использую программу RazorSQL. Но каждый раз, когда я начинаю импорт,
Код ошибки ISC 335544334 ->
Использует ли Firebird некоторые специальные форматы даты? Мне действительно нужен ответ, это очень важно. Эта проблема заставляет меня ждать, чтобы продолжить работу.
sql import excel firebird razorsql
1 ответ
1 Решение Mark Rotteveel [2018-08-16 16:09:00]
Сообщение об ошибке указывает, что Firebird попытался преобразовать значение строки 2002-07-07 22:00:00.000 в тип данных, отличный от CHAR / VARCHAR и не удалось, потому что строковое значение недействительно для целевого типа данных. Формат, как показано, будет правильно преобразован в TIMESTAMP , а это значит, что вы назначаете это либо неправильному столбцу, либо столбец имеет неправильный тип. Например, DATE не имеет компонента времени на диалекте 3, поэтому преобразование строки с компонентом времени завершится неудачей с этой ошибкой, так же как и преобразование в числовой столбец ( INTEGER , BIGINT и т.д.).
Без дополнительной информации о соответствующих столбцах и точном способе импорта невозможно предоставить более конкретный ответ.
I am currently working on a project which allows you to import data from an Excel file. I use the Programm RazorSQL. But every time I start the import, the
ISC error code 335544334 occures ->
Does Firebird use some special Date formats? I really need an answer, it’s very important. This problem keeps me waiting to continue with my work.
1 Answer 1
The error message indicates that Firebird tried to convert the string value 2002-07-07 22:00:00.000 to a datatype other than CHAR / VARCHAR and did not succeed because the string value is invalid for the target datatype. The format as shown will correctly convert to a TIMESTAMP , which means that you are assigning this either to the wrong column, or the column has the wrong type. For example, a DATE has no time component in dialect 3, so converting a string with a time component will fail with this error, as will converting to a numerical column ( INTEGER , BIGINT , etc).
Without more information about the columns involved and the exact method of import, it is not possible to provide a more specific answer.
Сейчас я работаю над проектом, который позволяет импортировать данные из файла Excel. Я использую Programm RazorSQL. Но каждый раз, когда я начинаю импорт, в
ISC код ошибки 335544334 встречается, ->
Используют ли Firebird некоторых специальных форматов даты? Я действительно нужен ответ, это очень важно. Эта проблема заставляет меня ждать, чтобы продолжить свою работу .
Сообщение об ошибке указывает на то, что Firebird пытался преобразовать строковое значение 2002-07-07 22:00:00.000 в тип данных, кроме CHAR / VARCHAR и не увенчались успехом , поскольку значение строки является недействительным для целевого типа данных. Формат , как показано правильно преобразовать к TIMESTAMP , что означает , что вы назначаете это либо к неправильному столбца, или столбец имеет неправильный тип. Например, DATE не имеет времени компонент в диалекте 3, так что преобразование строки с временным компонентом потерпит неудачу с этой ошибкой, как будет преобразовывать в числовой колонке ( INTEGER , BIGINT и т.д.).
Без дополнительной информации о столбцах, участвующих и точный метод импорта, это не представляется возможным дать более конкретный ответ.