BLToolkit provider for dotConnect

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
skalkin
Posts: 3
Joined: Wed 10 Oct 2012 20:21

BLToolkit provider for dotConnect

Post by skalkin » Wed 10 Oct 2012 20:38

Hi,

I believe there are quite a few people around who want to use BLToolkit with dotConnect. It looks like the author of BLToolkit is willing to add that provider to BLToolkit, but I think the fact that he has to pay for it is a show-stopper :) Any chance you can sort it out?

Here's the discussion on RSDN (in Russian):
http://www.rsdn.ru/forum/dotnet/4819447.flat

Cheers,
Andrew

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: BLToolkit provider for dotConnect

Post by Pinturiccio » Wed 17 Oct 2012 14:23

We will investigate the possibility to implement BLToolkit in dotConnect for Oracle, but we can't tell any timeframe at the moment.

skalkin
Posts: 3
Joined: Wed 10 Oct 2012 20:21

Re: BLToolkit provider for dotConnect

Post by skalkin » Sun 11 Nov 2012 01:03

BLToolkit's author says that all that he needs is the binaries and DevArt license (he needs that in order to build against your libraries, right?), he'll write the provider himself. Why don't you guys just give him the license? Sounds like a win-win to me!

http://rsdn.ru/forum/dotnet/4819447.flat

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: BLToolkit provider for dotConnect

Post by Pinturiccio » Tue 13 Nov 2012 15:00

Could you please tell us whether the dotConnect for Oracle Express Edition binaries will suit the BLToolkit's author?

skalkin
Posts: 3
Joined: Wed 10 Oct 2012 20:21

Re: BLToolkit provider for dotConnect

Post by skalkin » Thu 29 Nov 2012 20:22

Well, if I understand it correctly Express Edition uses Oracle Client to connect to the DB, but one of the main reasons for using DevArt is the direct mode. What would be the value of that BLToolkit provider if it won't be able to use the direct mode? Are you saying that both modes behave exactly the same?

rassokhin
Posts: 1
Joined: Thu 29 Nov 2012 21:01

Re: BLToolkit provider for dotConnect

Post by rassokhin » Thu 29 Nov 2012 22:32

Yes, I tend to agree with skalkin, it is the direct "driver-less" mode that makes dotConnect for Oracle very attractive. I can't tell whether the author of BLToolkit will be able to create a provider for dotConnect for Oracle using just the free Oracle Express edition. However, I am absolutely sure that the ability to use BLToolkit with dotConnect will lead to a noticeably wider acceptance of dotConnect among developers. I think granting a free license to the author of BLToolkit would be a very smart investment indeed :wink:

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: BLToolkit provider for dotConnect

Post by Shalex » Wed 05 Dec 2012 10:06

We have sent an email to the BLToolkit support team with an offer to include the licensed version of dotConnect for Oracle Professional (free of charge) in their tool. There is no response from BLToolkit.

megadude
Posts: 1
Joined: Wed 16 Jan 2013 23:26

Re: BLToolkit provider for dotConnect

Post by megadude » Wed 16 Jan 2013 23:43

dotConnect for Oracle data provider has been added to BLToolkit.

I found the following issues.

1. Milliseconds of DateTime value are truncated when DateTime is sent as a parameter.
2. Default data type for byte[] is Blob. Blobs are more restrictive than Raw.

These issues can be fixed in this way:

Code: Select all

public override void AttachParameter(IDbCommand command, IDbDataParameter parameter)
{
	var value = parameter.Value;

	if (value is DateTime)
	{
		parameter.Value = new OracleTimeStamp((DateTime)value);
	}
	else if (value is Guid)
	{
		parameter.Value = ((Guid)value).ToByteArray();
		parameter.DbType = DbType.Binary;
		((OracleParameter)parameter).OracleDbType = OracleDbType.Raw;
	}

	base.AttachParameter(command, parameter);
}
3. docConnect does not handle unicode characters properly.

The following test does not work:

Code: Select all

[Test]
public void Unicode()
{
	ForEachProvider(new[] { ProviderName.Informix, ProviderName.Firebird, ProviderName.Sybase }, db =>
	{
		try
		{
			db.Person.Delete(p => p.ID > 2);

			var id =
				db.Person
					.InsertWithIdentity(() => new Person
					{
						FirstName = "擊敗奴隸",
						LastName  = "Юникодкин",
						Gender    = Gender.Male
					});

			Assert.NotNull(id);

			var person = db.Person.Single(p => p.FirstName == "擊敗奴隸" && p.LastName == "Юникодкин");

			Assert.NotNull (person);
			Assert.AreEqual(id, person.ID);
			Assert.AreEqual("擊敗奴隸", person.FirstName);
			Assert.AreEqual("Юникодкин", person.LastName);
		}
		finally
		{
			db.Person.Delete(p => p.ID > 2);
		}
	});
}
Output:

Code: Select all

Provider : DevartOraclePro
DbManager: -- DevartOraclePro Oracle
DELETE FROM
	Person t1
WHERE
	t1.PersonID > 2

DbManager: Execution time: 00:00:00.0185023. Records affected: 0.

DbManager: -- DevartOraclePro Oracle
INSERT INTO Person
(
	FirstName,
	LastName,
	Gender
)
VALUES
(
	'擊敗奴隸',
	'Юникодкин',
	'M'
)
RETURNING
	PersonID INTO :IDENTITY_PARAMETER

DbManager: Execution time: 00:00:00.0515065

DbManager: -- DevartOraclePro Oracle
SELECT
	p.PersonID as ID,
	p.LastName,
	p.MiddleName,
	p.Gender,
	p.FirstName
FROM
	Person p
WHERE
	ROWNUM <= 2 AND p.FirstName = '擊敗奴隸' AND p.LastName = 'Юникодкин'

DbManager: Execution time: 00:00:00.0085011

DbManager: -- DevartOraclePro Oracle
DELETE FROM
	Person t1
WHERE
	t1.PersonID > 2

DbManager: Execution time: 00:00:00.0005000. Records affected: 1.


  String lengths are both 4. Strings differ at index 0.
  Expected: "擊敗奴隸"
  But was:  "????"
  -----------^
Russian characters are OK, Chinese are failed.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: BLToolkit provider for dotConnect

Post by Shalex » Mon 21 Jan 2013 12:03

megadude wrote:1. Milliseconds of DateTime value are truncated when DateTime is sent as a parameter.
2. Default data type for byte[] is Blob. Blobs are more restrictive than Raw.
We have reproduced and are investigating the issues. Thank you for sharing the workaround you have found.
megadude wrote:3. docConnect does not handle unicode characters properly.
Try using the "Unicode=true;" connection string parameter.
If it doesn't help, send us a small ADO.NET test project (including the DDL script of the table) and specify the following information for reproducing:
a) the exact version of your Oracle server (xx.x);
b) the NLS_LANGUAGE, NLS_CHARACTERSET, and NLS_NCHAR_CHARACTERSET parameters of your Oracle server;
с) the name, version of your operating system and its regional settings: Control Panel > Reginal and Language Options > Language for non-Unicode programs.

Post Reply