Question

For the past days I've been trying to use Entity Framework and LINQ 2 Entities, which work perfectly fine with SQL Server (as I would expect) but the problem is that I have to use Sybase ASE 15.5.

I say "the problem" because of the following:

  1. It usually takes too long to generate / update the model
  2. Sometimes it generates an error saying that the field < fieldname > is already in the metadata collection (I think it has something to do with named constraints or field names that are the same in tables with a relation (FKs being the most common)
  3. I made a simple model in which there would be no problems generating / updating, but the issue is that sometimes (depending on the query) the T-SQL generated by LINQ To Entities throws some error in ASE

I am using the Sybase SDK version 15.5.0.1000, Does the ADO.NET Provider from this SDK work well (as in, am I doing something wrong)?, if not, is there a newer one? are there any other stuff I have to install to solve these issues (like a newer SDK, some dll or some dialect for the translation)? (I'm aware there's a new Sybase ASE -15.7- but does it come with a new SDK? and probably doesn't matter much since I'm not sure the IT Director and CIO would approve for a change right now)

I've also tried the Data Direct provider but it gets stuck while trying to generate the model, BLToolkit is too, from what I read at their site, dependant on the vendor data provider (at least for non-Microsoft DBs). I would really like something that works with Entity Framework, but just something that works with ASE and ASE CE will do at this point (haven't tried NHibernate just yet mostly because at first glance it seems to involve too much manual work, and read somewhere it had some problems with ASE)

Thanks in advance for any help that you can provide.

Was it helpful?

Solution

Since it's been a whole week and not even a comment was made, I'm gonna answer this myself.

It seems that the SDK has indeed problems, apparently the model generation creates a monster of T-SQL that gets executed, thus the big delay. It indeed has some problems with constraints that are named similarly but only in ASE, in ASE CE it doesn't appear to have any. I could not find any resource like a dialect specific for ASE so I guess their driver is not ready to use with Entity Framework, because the T-SQL generated is for SQL Server which in some queries will throw an exception with ASE.

I'm probaly gonna go with NHibernate since it seems to be the one path that will be the most beneficial (as in, it actually works) and it's free. Also, seems like the Progress (DataDirect) people do offer support during trial period for their ADO.NET provider, I will call them up and see if the issues can be solved easily, in which case, I'll probably end up using it.

UPDATE: Apparently this has been fixed since now I can create a model with the Sybase driver.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top