Page 1 of 1

Field type error with UniDac and NexusDB

Posted: Thu 04 Aug 2016 12:37
by Emil1957
Hi,
we are currently testing if we can extend our applications (using UniDAC) so that the users can also use NexusDB as a database (currently we support Access, Interbase, MSSQL, MySQL). I have created a small test app with a TUniConnection and a TUniQuery. The TUniQuery has persistent fields of type WideString.

For different providers (SQL Server...) I have created data type mappings. For example, a field which is created as "varchar" in a MSSQL Server database, but defined as WideString in the persistent field list of the query is correctly read. But I have problems to define the data type mappings for NexusDB:

The NexusDB test database was created with a SQL script with "varchar" data type. When i try to open the query using the NexusDB provider I get the error "different types for field XXX; expected: WideString, found: String" (the original message is in German). The problem is that I cannot find "string" or "varchar" in the column "Database type" in the Data Type Mapping dialog of the TUniConnection for NexusDB.

In the MSSQL test database, the same fields were also created as "varchar", if I map this type to WideString in the mapping dialog, I get no error when the query is opened.

So my question: Which "Database Type" I have to use for NexusDB in the Data Type Mapping dialog?

Re: Field type error with UniDac and NexusDB

Posted: Thu 04 Aug 2016 12:56
by Emil1957
Hi,

I am one step further: I checked the field type in the NexusDB admin tool. There the varchar fields are shown as "NullString", this type I can find in the mapping dialog. But when I map "NullString" to "WideString" and open the query I get an error

Assertion failure:
(D:\Projects\Delphi\Dac\Common\Source\CRDataTypeMap.pas, Line 1492)

The funny thing ist that I don't have a D: drive on my machine.

Re: Field type error with UniDac and NexusDB

Posted: Thu 04 Aug 2016 13:04
by Emil1957
Hi,
some more informations: If I delete the mapping list for NexusDB provider and also delete the persistent field list of the TUniQuery I can open the query without problem. But if the mapping list is not empty but the persistent field list is empty, the error occurs. There seems to be something wrong with the datatype mapping for NexusDB.

Re: Field type error with UniDac and NexusDB

Posted: Fri 05 Aug 2016 09:14
by ViktorV
When using the NexusDB provider, in the Database type combobox in the Data Type Mapping dialog you should specify NexusDB type, not SQL type. See details about correspondence between SQL type and NexusDB type in NexusDB help: http://www.nexusdb.com/support/index.ph ... atypes.htm

Re: Field type error with UniDac and NexusDB

Posted: Fri 05 Aug 2016 12:49
by Emil1957
I already found this solution (see my second post). But this lead to anotehr problem (see 2nd and 3rd post).

Re: Field type error with UniDac and NexusDB

Posted: Fri 05 Aug 2016 12:50
by ViktorV
We have already fixed the assertion error, the fix will be included in the next UniDAC build.

Re: Field type error with UniDac and NexusDB

Posted: Fri 05 Aug 2016 14:02
by Emil1957
Hi,

thanks a lot!

Re: Field type error with UniDac and NexusDB

Posted: Fri 05 Aug 2016 14:07
by ViktorV
Thank you for being interested in our products.
If you have any questions concerning our products, please don't hesitate to contact us - and we will try to help you resolve them.

Re: Field type error with UniDac and NexusDB

Posted: Tue 09 Aug 2016 08:08
by Emil1957
Can you estmate when an update will be available?

Re: Field type error with UniDac and NexusDB

Posted: Tue 09 Aug 2016 08:16
by ViktorV
We are going to release a new build of UniDAC including the fix next month.

Re: Field type error with UniDac and NexusDB

Posted: Tue 09 Aug 2016 12:12
by Emil1957
Thank you, this is sufficient for me

Re: Field type error with UniDac and NexusDB

Posted: Tue 09 Aug 2016 13:18
by ViktorV
Thank you for being interested in our products.
If you have any questions concerning our products, please don't hesitate to contact us - and we will try to help you resolve them.