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'm new to Lightspeed and looking to buy it because of its ability to support Oracle, Microsoft SQL and VistaDB. I'm testing Oracle at the moment and I've tried the Oracle9 and OracleOdp9 and I'm getting an error message just trying to retrieve the contents on a table. If I use ODP I just get an OracleException which doesn't tell me anything. If I use the Microsoft one I get this.
System.Data.OracleClient.OracleException was unhandled Message="ORA-06550: line 8, column 11:\nPL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification\nORA-06550: line 4, column 1:\nPL/SQL: SQL Statement ignored\n" Source="System.Data.OracleClient" ErrorCode=-2146232008 Code=6550 StackTrace: at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at ...() at ..(IUnitOfWork , IDbCommand , ) at ..(IUnitOfWork , IDbCommand ) at ...ctor(IUnitOfWork , IEnumerable`1 ) at Mindscape.LightSpeed.Data.DataProviderAdapter.(IUnitOfWork , IEnumerable`1 ) at ..(TypeModel , Query , IList ) at ..(UnitOfWorkBase , TypeModel , Query , IList ) at ..(Query , TypeModel , IList ) at ..(Query , IList ) at Mindscape.LightSpeed.UnitOfWork.Find(Query query, IList results) at Mindscape.LightSpeed.UnitOfWorkBase.Find(Query query) at Mindscape.LightSpeed.Linq.Plan.SingleQueryPlan.ExecuteImmediate(IUnitOfWork unitOfWork, Type returnType) at Mindscape.LightSpeed.Linq.LinqQueryProvider.Execute(Expression expression) at Mindscape.LightSpeed.Linq.LinqQueryProvider.System.Linq.IQueryProvider.Execute(Expression expression) at Mindscape.LightSpeed.Linq.LinqQuery`1.GetEnumerator() at ConsoleTestApp.Class1.Main(String[] args) in C:\Documents and Settings\mark\My Documents\My Dropbox\Visual Studio 2008 Projects\PasswordReset\Components\ConsoleTestApp\Class1.cs:line 39 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: I'm running this on Windows XP with the Oracle11g client connecting to a Windows 2008 server running Oracle11g. I'm not sure which version but I just downloaded it a couple of days ago.
Any Ideas?
Thanks,
Mark
|
|
|
I'm not sure if this is an Oracle setting or what but I configured lightspeed to output to the console and saw that it was doing this.
BEGIN So I added " around the column names. SELECT Then the SQL query ran fine. |
|
|
I just tried setting QuoteIdentifiers = true and tried another table.
SELECT However for some reason it doesn't work with " around the table name. Any ideas |
|
|
Okay I've got it working by setting the QuoteIdentifiers = true and making sure that the table names in the lsmodel file are upper case. |
|
|
I think this may be an Oracle setting -- usually Oracle table and column names are case-insensitive, but I believe that when creating a table you can define it to be case-sensitive -- in which case as you have found you will need to set QuoteIdentifiers = true and ensure that the Table Name settings in LightSpeed match the capitalisation in the database. Glad it's working for you now and sorry the forums were giving you spurious errors! |
|
|
I think I've figure out the problem I think at some point a reserved word was used for a column names and rather then rename the column the developer at the time added " around the name of the columns when creating the table. So every column because case-sensitive. Then if you want the table case sensitive you would do Hope this helps anyone else out there. |
|