Type mismatch for field
-
- Posts: 8
- Joined: Mon 20 Jun 2011 09:40
Type mismatch for field
Hi,
I just installed Devart drivers for interbase.
When trying it I get this error:
Type mismatch for field 'ENV', expecting: String actual: WideString
The field in the table is defined as varchar(12).
Why an error?
This program is working with standard DBXdrivers.
I just installed Devart drivers for interbase.
When trying it I get this error:
Type mismatch for field 'ENV', expecting: String actual: WideString
The field in the table is defined as varchar(12).
Why an error?
This program is working with standard DBXdrivers.
Hello,
To solve the problem, you should set the UseUnicode parameter to False in the following way:The UseUnicode parameter enables or disables Unicode support. When it's set to True, all character data is stored as WideStrings, and TStringField is replaced with TWideStringField.
To solve the problem, you should set the UseUnicode parameter to False in the following way:
Code: Select all
SQLConnection.Params.Values['UseUnicode'] := 'False';
-
- Posts: 8
- Joined: Mon 20 Jun 2011 09:40
Please supply me the following information:
- the exact version of dbExpress driver for InterBase & Firebird;
- the exact version of your IDE;
- the exact version of Firebird or InterBase.
- the character set of your database;
- a script to create and fill the table opening of which causes this problem.
- the exact version of dbExpress driver for InterBase & Firebird;
- the exact version of your IDE;
- the exact version of Firebird or InterBase.
- the character set of your database;
- a script to create and fill the table opening of which causes this problem.
-
- Posts: 8
- Joined: Mon 20 Jun 2011 09:40
I solved it.
I have misspelled Charset ISO8859_1 instead of ISO8859-1.
Dont't you validate the values in options?
The program is now ok but very very slow. The program is a Service with severals treads with it's on datamodule that read XML files and loads data from the xml file in one database and the xmlfile it self in another database as a blob.
Before Devart I loaded about 60 xmlfiles per second. Now it only loads 28 xml files per second. I have added Preperad=True in options but it does not help.
Could the slow access depend on some settings with the blob?
SQLDialect=3
BlobSize=-1
ErrorResourceFile=
LocaleCode=0000
DevartInterBase TransIsolation=ReadCommited
WaitOnLocks=True
Charset=ISO8859-1
CharLength=1
EnableBCD=True
OptimizedNumerics=True
LongStrings=False
UseQuoteChar=False
FetchAll=False
UseUnicode=False
Prepared=True
TrimFixedChar=False
I have misspelled Charset ISO8859_1 instead of ISO8859-1.
Dont't you validate the values in options?
The program is now ok but very very slow. The program is a Service with severals treads with it's on datamodule that read XML files and loads data from the xml file in one database and the xmlfile it self in another database as a blob.
Before Devart I loaded about 60 xmlfiles per second. Now it only loads 28 xml files per second. I have added Preperad=True in options but it does not help.
Could the slow access depend on some settings with the blob?
SQLDialect=3
BlobSize=-1
ErrorResourceFile=
LocaleCode=0000
DevartInterBase TransIsolation=ReadCommited
WaitOnLocks=True
Charset=ISO8859-1
CharLength=1
EnableBCD=True
OptimizedNumerics=True
LongStrings=False
UseQuoteChar=False
FetchAll=False
UseUnicode=False
Prepared=True
TrimFixedChar=False
-
- Posts: 8
- Joined: Mon 20 Jun 2011 09:40
We will investigate the possibility of adding charset checking on connecting.
I cannot reproduce the problem. Please try composing a small sample to demonstrate the problem and send it to andreyz*devart*com, including a script to create and fill a table. Also please supply the information that I asked for in my previous post.
I cannot reproduce the problem. Please try composing a small sample to demonstrate the problem and send it to andreyz*devart*com, including a script to create and fill a table. Also please supply the information that I asked for in my previous post.
-
- Posts: 8
- Joined: Mon 20 Jun 2011 09:40
-
- Posts: 8
- Joined: Mon 20 Jun 2011 09:40
Thank you for the information. We have reproduced the problem with the Charset option and fixed it. This fix will be included in the next dbExpress driver for InterBase & Firebird build.
To set the server charset, you should add the ServerCharSet option to the SQLConnection.Params property with the ISO8859_1 value. Note that if you are using Delphi version earlier than RAD Studio 2007, you should use the TCRSQLConnection component instead of TSQLConnection. The TCRSQLConnection component is needed to overcome restrictions of dbExpress on Delphi versions earlier than RAD Studio 2007. For more information, please read the dbExpress driver for InterBase & Firebird documentation.
To set the server charset, you should add the ServerCharSet option to the SQLConnection.Params property with the ISO8859_1 value. Note that if you are using Delphi version earlier than RAD Studio 2007, you should use the TCRSQLConnection component instead of TSQLConnection. The TCRSQLConnection component is needed to overcome restrictions of dbExpress on Delphi versions earlier than RAD Studio 2007. For more information, please read the dbExpress driver for InterBase & Firebird documentation.
To help you with the working speed problem, I need additional information. Without it I will not be able to help you. Please specify the following:
- the exact version of dbExpress driver for InterBase & Firebird;
- the exact version of your IDE;
- the exact version of Firebird or InterBase.
- a script to create a table.
Also, I will be able to help you faster if you create a small sample to demonstrate this problem and send it to andreyz*devart*com.
- the exact version of dbExpress driver for InterBase & Firebird;
- the exact version of your IDE;
- the exact version of Firebird or InterBase.
- a script to create a table.
Also, I will be able to help you faster if you create a small sample to demonstrate this problem and send it to andreyz*devart*com.
-
- Posts: 8
- Joined: Mon 20 Jun 2011 09:40
- the exact version of dbExpress driver for InterBase & Firebird;
(The latest. Just downoalded a couple a days ago)
- the exact version of your IDE;
(Rad Studio XE)
- the exact version of Firebird or InterBase.
(Interbase 7.5.1)
- a script to create a table.
Also, I will be able to help you faster if you create a small sample to demonstrate this problem and send it to andreyz*devart*com.
It's impossible to that. If I do, I don't know if I get speed problem just on one table. I will sent more information to andreyz*devart*com
(The latest. Just downoalded a couple a days ago)
- the exact version of your IDE;
(Rad Studio XE)
- the exact version of Firebird or InterBase.
(Interbase 7.5.1)
- a script to create a table.
Also, I will be able to help you faster if you create a small sample to demonstrate this problem and send it to andreyz*devart*com.
It's impossible to that. If I do, I don't know if I get speed problem just on one table. I will sent more information to andreyz*devart*com
Unfortunately, I still cannot reproduce the problem with performance. I've tested our driver on records insertion and working with BLOB fields, and results showed that our driver is faster than the standard one. Therefore I need a sample project that demonstrates this problem. Please try composing this sample project and send it to me, including a script to create all needed server objects.