This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I wonder if you've run into this, or if SQL Server 2000 is supported in the "it really works, no partial features" sort of way. I think if it is, I'm in for a license. I've been building a project that is supposed to go on SQL Server 2000 but made the unfortunate choice of using SQL 2005 on my development machine. Just to make sure everything was ok, I recently installed SQL 2000 and tried running against that. Here is the error I get when I try to update the model from the database:
Invalid object name 'sys.key_constraints'
Invalid object name 'sys.tables'
Invalid object name 'sys.schemas'
Invalid object name 'sys.index_columns'
Invalid object name 'sys.columns'
PS - Telling me "LightSpeed & 2000 is not a good idea" is certainly as helpful as anything else.
|
|
|
We don't test LightSpeed on SQL Server 2000 -- hence the explicit reference in the provider name to SQL Server 2005! I am not sure how much of LightSpeed would work on SQL Server 2000. The designer database integration is unlikely to work too well because things like the catalog views are completely different between 2000 and 2005. (Updating the database *might* work because we emit fairly simple SQL DDL for that.) As for the runtime, basic queries will probably work, but as soon as you get onto even fairly routine stuff like paging, you may run into problems (e.g. paging uses the ROW_NUMBER function which was added in SQL Server 2005.) So really, "LightSpeed and 2000 is not a good idea" *grin*. You may find that bits of it work, but we can't make any guarantees on how much or how well, and we won't be able to support you with any 2000-specific problems. Sorry. Also, as you may be aware, SQL Server 2000 is no longer in mainstream support. I'm guessing that the decision to run this project on 2000 is not yours, and that there are other constraints that mean the project has to run on 2000, but it's something to be aware of if the decision is not absolutely set in stone. |
|
|
Cool, thanks for the info. Sadly I'm stuck with 2000 for now, but I'll definitely be back for the next project.
Thanks again,
James
|
|
|
Any hope of 2000 coming soon?
|
|
|
We surrender *grin*. We've scheduled this in, and will post again when we have something for you, probably early next week. |
|
|
Sweet! Can't wait, all the ORM threads I've read have at least two "I use Lightspeed and it's great" comments and I'm glad not to be left behind.
Thanks again,
James |
|
|
Hello James, Just to update you on this, we will have limited SQL Server 2000 support in the 27 May nightly build, available after about 1430 GMT. Please note that this is an early build and there are a few caveats: 1. No paging support. You cannot currently use a Page clause (or the LINQ equivalents, Skip and Take) with SQL Server 2000. 2. Designer does not auto-detect SQL Server 2000. If you drag a table from SQL 2000 onto a new model, it will try to use the SQL 2005 provider and you will get the "sys.keyconstraints" error. To fix this, go to the Properties window and change the Database Provider to SqlServer2000 BEFORE you drag the table on. (This setting is remembered so you only need to do it once. You don't need to pre-configure the connection string, just the provider.) You may also find SQL 2000 database sync slow with large numbers of entities/tables. Let us know if this becomes a major issue for you. 3. Eager loading will cause errors if the entity contains text, ntext or image columns. Note also we do not ship separate a KeyTable script for SQL 2000; use the one from the SQL 2005 directory. We can't give you fix dates for these issues yet, so if you feel this isn't ready for you to try out then fair enough -- I just wanted to let you know where we were. If you do take it for a spin, it is likely you will run across a few bugs as well I'm afraid (like I said, this is an early build). It would be really useful if you could let us know about anything you run into. Thanks! |
|
|
Thanks so much! I'll definitely take it for a spin and pass along my experiences as I go along.
Thanks again,
James
|
|
|
I tried it out in a project I'm working on, but ran into a problem using Linq against a view (SQL Server 2000 not supported).
Thanks!
James
|
|
|
Can you provide us with the query, the exact error message and the stack trace please? This *probably* means the LINQ operator is internally trying to use paging (which we haven't yet implemented on 2000), and if so I can probably get you a fix or workaround... but it may be something else. |
|
|
Sure, here is the message:
{System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotImplementedException: SQL Server 2000 is not yet supported
at ..(LightSpeedContext , , Page , Boolean , )
at ..( , Boolean , )
at ..( , Order )
at ..(TypeModel , QueryExpression , Order , String , Boolean , Boolean )
at ..(TypeModel , QueryExpression , Order , String , Boolean , Boolean )
at ..(TypeModel , Query , String , String )
at ..(TypeModel , Query )
at ..(TypeModel , Query , IList )
at ..(UnitOfWork , TypeModel , Query , IList )
at ..(Query , TypeModel , IList )
at ..(Query , IList )
at Mindscape.LightSpeed.UnitOfWork.Find(Query query, IList results)
at Mindscape.LightSpeed.UnitOfWorkBase.Find[TEntity](Query query)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Mindscape.LightSpeed.Linq.ProjectionStrategy.ExecuteEntityQuery(Query query, IUnitOfWork unitOfWork)
at Mindscape.LightSpeed.Linq.ProjectionStrategy.Execute(Query query, IUnitOfWork unitOfWork)
at Mindscape.LightSpeed.Linq.LinqQueryExecutionPlan.Execute()
at Mindscape.LightSpeed.Linq.Sqo.FirstBase.Evaluate(LinqQueryExecutionPlan plan)
at Mindscape.LightSpeed.Linq.Sqo.ImmediateSqoWithPredicate.Evaluate(LinqQueryExecutionPlan plan, MethodCallExpression expression)
at Mindscape.LightSpeed.Linq.Sqo.ImmediateSqoWithPredicateWithExpressionContext.PerformVisit(LinqQueryTranslator visitor, MethodCallExpression expression)
at Mindscape.LightSpeed.Linq.LinqQueryTranslator.VisitMethodCall(MethodCallExpression m)
at Mindscape.LightSpeed.Linq.ExpressionVisitor.Visit(Expression exp)
at Mindscape.LightSpeed.Linq.LinqQueryTranslator.Translate(Expression expression, IUnitOfWork unitOfWork, String viewName)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute
![]() |
|
|
Sure, here is the message:
{System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotImplementedException: SQL Server 2000 is not yet supported
at ..(LightSpeedContext , , Page , Boolean , )
at ..( , Boolean , )
at ..( , Order )
at ..(TypeModel , QueryExpression , Order , String , Boolean , Boolean )
at ..(TypeModel , QueryExpression , Order , String , Boolean , Boolean )
at ..(TypeModel , Query , String , String )
at ..(TypeModel , Query )
at ..(TypeModel , Query , IList )
at ..(UnitOfWork , TypeModel , Query , IList )
at ..(Query , TypeModel , IList )
at ..(Query , IList )
at Mindscape.LightSpeed.UnitOfWork.Find(Query query, IList results)
at Mindscape.LightSpeed.UnitOfWorkBase.Find[TEntity](Query query)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Mindscape.LightSpeed.Linq.ProjectionStrategy.ExecuteEntityQuery(Query query, IUnitOfWork unitOfWork)
at Mindscape.LightSpeed.Linq.ProjectionStrategy.Execute(Query query, IUnitOfWork unitOfWork)
at Mindscape.LightSpeed.Linq.LinqQueryExecutionPlan.Execute()
at Mindscape.LightSpeed.Linq.Sqo.FirstBase.Evaluate(LinqQueryExecutionPlan plan)
at Mindscape.LightSpeed.Linq.Sqo.ImmediateSqoWithPredicate.Evaluate(LinqQueryExecutionPlan plan, MethodCallExpression expression)
at Mindscape.LightSpeed.Linq.Sqo.ImmediateSqoWithPredicateWithExpressionContext.PerformVisit(LinqQueryTranslator visitor, MethodCallExpression expression)
at Mindscape.LightSpeed.Linq.LinqQueryTranslator.VisitMethodCall(MethodCallExpression m)
at Mindscape.LightSpeed.Linq.ExpressionVisitor.Visit(Expression exp)
at Mindscape.LightSpeed.Linq.LinqQueryTranslator.Translate(Expression expression, IUnitOfWork unitOfWork, String viewName)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute
![]() |
|
|
I think I got around this by using Single instead of FirstOrDefault (which I shouldn't have been using in this case) but now I'm running into an InvalidCastException while the Linq query is converting from a BIT field in my view to a Bool field in the generated view entity.
System.Transactions Critical: 0 : http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/UnhandledUnhandled exceptionLightspeedTest.vshost.exeSystem.Reflection.TargetInvocationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Mindscape.LightSpeed.Linq.ProjectionStrategy.ExecuteEntityQuery(Query query, IUnitOfWork unitOfWork)
at Mindscape.LightSpeed.Linq.ProjectionStrategy.Execute(Query query, IUnitOfWork unitOfWork)
at Mindscape.LightSpeed.Linq.LinqQueryExecutionPlan.Execute()
at Mindscape.LightSpeed.Linq.Sqo.SingleBase.Evaluate(LinqQueryExecutionPlan plan)
at Mindscape.LightSpeed.Linq.Sqo.ImmediateSqoWithPredicate.Evaluate(LinqQueryExecutionPlan plan, MethodCallExpression expression)
at Mindscape.LightSpeed.Linq.Sqo.ImmediateSqoWithPredicateWithExpressionContext.PerformVisit(LinqQueryTranslator visitor, MethodCallExpression expression)
at Mindscape.LightSpeed.Linq.LinqQueryTranslator.VisitMethodCall(MethodCallExpression m)
at Mindscape.LightSpeed.Linq.ExpressionVisitor.Visit(Expression exp)
at Mindscape.LightSpeed.Linq.LinqQueryTranslator.Translate(Expression expression, IUnitOfWork unitOfWork, String viewName)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression)
at Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute
![]() ![]() |
|
|
Our forums software has mangled your posting I'm afraid -- I can only see the beginning of your query code. Could you possibly repost the query? From the fact that you mention FirstOrDefault this does look like a paging issue and I think we can provide an interim fix for this in case you need to use First instead of Single in a future query. Also, could you post the schema for the GearDetailsView table or view? If it is a view, could you also provide the schema(s) for the table(s) from which it selects? Thanks! |
|
|
No worries, I created a simpler test project to produce a similar result. Attached are the source files, database script, model and some "steps to reproduce". The problem I ran into with the sample project is similar to the one I was having with the real thing save for the field type that wasn't being materialized. I'm guessing whatever is being retrieved from the reader isn't really what is expected.
|
|
|
Just discovered something I overlooked in the sample. I tried adding the table directly to the model designer and was surprised when I got the same error as I did with the view. After setting FieldId as the primary key in the database and refreshing the model the table started working and the view continued to fail. So I went into the model designer and explicitly removed the FieldId property (since this is what happened to the table when I refreshed) and now the view works. Making a similar change in my main project (and using Single instead of FirstOrDefault) fixed the problem. So I guess the solution might be to catch when the user assigns a primary key to a view and to remove the associated field from the entity.
|
|
|
Ah, that makes sense. LightSpeed wasn't able to locate the identity column -- setting the Identity Column Name in the designer would fix that, but having a field also mapping to the same column would confuse it. I don't think we'll be able to automatically detect this scenario but we'll keep it in mind -- thanks for letting us know what was going on. Can I just confirm then that everything (except FirstOrDefault) is now working for you -- you don't need us to do any further investigation on this issue? By the way, First and FirstOrDefault should be fixed in tonight's (12 June) nightly. This should also enable Take support (Page.Limit in the core API). You still won't be able to do Skip (Page.Offset in the core API) though. |
|
|
So I finally got around to licensing the standard version, and it looks like the SQL2000 provider isn't in the production or nightly builds. Is there a way to re-enable it?
Thanks!
James
|
|
|
I forgot to uninstall the production when I tried the nightly, its in there.
Thanks!
James
|
|