|
|
|
|
информация о разделе
![]() |
Данный раздел предназначается исключительно для обсуждения вопросов использования языка запросов SQL. Обсуждение общих вопросов, связанных с тематикой баз данных — обсуждаем в разделе «Базы данных: общие вопросы». Убедительная просьба — соблюдать «Правила форума» и не пренебрегать «Правильным оформлением своих тем». Прежде, чем создавать тему, имеет смысл заглянуть в раздел «Базы данных: FAQ», возможно там уже есть ответ. |
Invalid data conversion
, непонятна причина
- Подписаться на тему
- Сообщить другу
- Скачать/распечатать тему
|
|
|
|
Full Member Рейтинг (т): 11 |
Привет всем! Собственно сабж. (IBClientError Invalid data conversion) Ошибка возникает именно при выполнении процедуры в дельфе. В IBExpert сама ХР проходит без проблем. Передаю в процедуру только один параметр строкового типа, ошибаться просто негде! Может у кого есть мысли из-за чего может быть? Текст хранимой процедуры: CREATE PROCEDURE ADD_URL ( AURL VARCHAR(250)) RETURNS ( OID BIGINT) AS DECLARE VARIABLE COUN INTEGER; DECLARE VARIABLE CURID BIGINT; begin /* Procedure Text */ for select count(id) from urls where url = :aurl into :coun do if (coun = 0) then begin curid = GEN_ID (gen_urls_id,1); insert into urls (id, url, hsip) values (:curid, :aurl, »); oid = curid; end else begin oid = 0; end suspend; end^ Сам вызов из дельфи: FSP.Close; FSP.StoredProcName:= ‘ADD_URL’; if FTR.InTransaction = false then FTR.StartTransaction; FSP.Params.Clear; FSP.ParamByName(‘AURL’).AsString:= ‘333’; //URL; FSP.ExecProc; ID:= FSP.ParamByName(‘OID’).AsInteger;
где FSP — IBStoredProcedure, FTR — IBTransaction. |
|
Modest Wizard |
|
|
FSP — IBStoredProcedure — динамически если создаешь, то например в TADOStoredProc нужно перед присваением значения параметра , его создать: SP.Parameters.CreateParameter(‘AURL’,ftString,pdInput,255,»); , в твоем случае мб что-нибудь подобное. Сообщение отредактировано: Modest Wizard — 05.09.06, 08:04 |
|
SilverShield |
|
|
Full Member Рейтинг (т): 11 |
Modest Wizard, по крайней мере для MS SQL в TADOStoredProc не требовалось создавать параметры отдельно. В моем случае, есть целая куча других процедур, в которые параметры передаются точно также, но которые работают. Проблема в чем то другом… |
|
SilverShield |
|
|
Full Member Рейтинг (т): 11 |
Кажется разобрался: GEN_ID возвращает integer, а не BIGINT и поэтому при присвоении выходному параметру (типа BIGINT) значения генератора и возникала ошибка. Этот IB не перестает меня удивлять! |
0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
0 пользователей:
- Предыдущая тема
- Базы данных: SQL
- Следующая тема
[ Script execution time: 0,0634 ] [ 15 queries used ] [ Generated: 4.06.23, 02:58 GMT ]
Moderators: TerryRogers, Max
-
Nomade
- Guru
- Posts: 135
- Joined: Sat Jun 27, 2009 3:41 am
- Location: Quebec, Canada
Invalid Data Conversion
Hi Max,
I took a chance and installed 3.2 RC2. When I asked to open my database, got a message saying «invalid data conversion». Any module I try to go, I get the same error message. I also get a «Access violation at address 00877E83 in module «EssentialPIM.exe» read of address FFFFFFFC». Good thing I made a backup of my database in another folder. Uninstalled 3.2 RC2 and no problem reopening my database with 3.12.
Reagards
-
Nomade
- Guru
- Posts: 135
- Joined: Sat Jun 27, 2009 3:41 am
- Location: Quebec, Canada
Re: Invalid Data Conversion
Post
by Nomade » Fri Nov 27, 2009 6:32 pm
UPDATE:
Hi Max,
Tried a bunch of things to see where could be the problem and here is what I found. If I install 3.2 RC2 and open my database, it will work perfectly as long as I don’t open the «Options» window. As soon as I open the options window to make one change, then the error message will appear and then there is nothing I can do. So opening this «options» window creates the «Invalid Data Conversion» error.
-
Nomade
- Guru
- Posts: 135
- Joined: Sat Jun 27, 2009 3:41 am
- Location: Quebec, Canada
Re: Invalid Data Conversion
Post
by Nomade » Fri Nov 27, 2009 6:45 pm
Hi Max,
Haven’t tried a new database but better than that, I just found the problem. As soon as I uncheck the «Show private items» thats the cause. Everything else I change in the options doesn’t create any problem but as soon as I uncheck this one, thats when it happens. If I put the check back, the program returns to working fine.
Regards
-
Max
- Site Admin
- Posts: 21714
- Joined: Wed Dec 08, 2004 11:39 pm
- Has thanked: 819 times
- Been thanked: 364 times
- Contact:
Re: Invalid Data Conversion
Post
by Max » Fri Nov 27, 2009 6:57 pm
Thank you, but please try on a new database. I can not reproduce it and need to know whether that’s database specific or not.
Maxim,
EPIM Team
-
Nomade
- Guru
- Posts: 135
- Joined: Sat Jun 27, 2009 3:41 am
- Location: Quebec, Canada
Re: Invalid Data Conversion
Post
by Nomade » Fri Nov 27, 2009 7:09 pm
Max wrote:Thank you, but please try on a new database. I can not reproduce it and need to know whether that’s database specific or not.
Just created a new database and same problem occur. Uncheck this option, error message. Put back the check, programs work fine.
-
Max
- Site Admin
- Posts: 21714
- Joined: Wed Dec 08, 2004 11:39 pm
- Has thanked: 819 times
- Been thanked: 364 times
- Contact:
Re: Invalid Data Conversion
Post
by Max » Fri Nov 27, 2009 8:48 pm
Hm…maybe depends on what Task or ToDo you create?
I made a new database, create one private TODo and one private Task. Then unchecked «Show Private items» in Options and tried all modules- works without errors…
Maxim,
EPIM Team
-
Nomade
- Guru
- Posts: 135
- Joined: Sat Jun 27, 2009 3:41 am
- Location: Quebec, Canada
Re: Invalid Data Conversion
Post
by Nomade » Fri Nov 27, 2009 9:21 pm
Ok, i tried again with another new database. made it simple. One Todo, one task, one note. The problem is definatly there for me. As soon as I change the «show — hide private items» in options, it goes bazerk. Tried it on my laptop and pc. Two different installations. Uninstalled 3.12 and database file to make sure of having everything installed from scratch. As soon as I uncheck that option, Invalid data Conversion comes back again. Mind you Max, I wont go crazy with that. All I have to do is leave it alone. But I only wished the program would work right.
Even tried just installing the new version after uninstalling 3.12 and the directory containing the database. Just using the test database. As soon as I uncheck the private option, same thing. I tried installing both in English and after that, in french. I tought that maybe the french version had a bug. Also, the CTRL-L shortcut does not work. It doesn’t hide the private items.
String expression = CHEMICAL_REORDERPOINT + "*" + searchRequest.getReorderPercentage() + "/100)";
Before :
String expression = CHEMICAL_REORDERPOINT + "*" + searchRequest.getReorderPercentage() + "/100)";
searchRequest.getReorderPercentage() comes dynamically from browser after submit value.
Lets take value for searchRequest.getReorderPercentage() = 50
so String expression = CHEMICAL_REORDERPOINT*50/100;
This is getting populated in a prepared statement of JDBC in my application, so to maintain the prepare statement rule i have used in below way:
After :
String expression = CHEMICAL_REORDERPOINT + "*?)"
String str = searchRequest.getReorderPercentage() + "/100";
params.add(str)
here params is a list from which the parameters will be iterated and will be placed in postion parameters of prepare statement while executing it.
But now i m getting exception like
Invalid data conversion: Parameter instance 50.0/100 is invalid for the requested conversion. ERRORCODE=-4461, SQLSTATE=42815
Pls can any one help me out. Thanks
Problem
Case Foundation Case Analyzer generates Invalid data conversion errors when it is started after adding custom Process Engine data fields to its configuration
Symptom
The calog.txt file, located in the Case Analyzer installation folder (for example: Program Files (x86)ibmFileNetCase Analyzer Enginejpa) has exceptions similar to the following:
-
… [filenet.pa.datacollector.PEEventDispatcher — 2] SEVERE datacollector Event dispatcher thread 2 work on view VWVL1_DEFALTEVENTLOG: Database error:
com.ibm.db2.jcc.am.SqlException: [jcc][1093][10420][3.57.82] Invalid data conversion: Parameter instance is invalid for the requested conversion to integer. ERRORCODE=-4220, SQLSTATE=null
Cause
The Process Engine data field was added to the Case Analyzer configuration with an incorrect type.
Environment
Case Foundation PE 5.1, Case Foundation CA 5.1
Diagnosing The Problem
Compare the field type of the custom data fields in the Case Analyzer database and the Process Engine database.
To check the field types in the Case Analyzer database, check the records in the X_DataFields table. For example, run the SELECT * FROM X_DataFields query:
To check the field types in the Process Engine database, run the logconfig [PE event log name] command in vwtool on the Process Engine. Use the name of the Process Engine event log where the fields were added to Case Analyzer from. For example:
In the example above, the ApplicationID field will make Case Analyzer generate the Invalid data conversion errors, because it was added as an integer (Int) field to the Case Analyzer configuration, but it is a String field in the Process Engine database.
Resolving The Problem
Drop the custom data field with a type mismatch from the Case Analyzer configuration, and add it back with the correct type. You can do this in the Case Analyzer Process Task Manager.
[{«Product»:{«code»:»SSTHRT»,»label»:»IBM Case Foundation»},»Business Unit»:{«code»:»BU053″,»label»:»Cloud & Data Platform»},»Component»:»Process Analyzer»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»5.0;5.1.0″,»Edition»:»All Editions»,»Line of Business»:{«code»:»LOB45″,»label»:»Automation»}}]
In this blog post, you’ll learn more about the Sybase Error Invalid data conversion and the reason for receiving this error
Sybase SQL Error Message
Invalid data conversion
Reason for this Error
The database could not convert a value to the required type. The value being converted was either supplied to the database on an insert, update, or as a host bind variable, or was a value retrieved from the database into a host variable or SQLDA.









