Search found 9 matches

by joeu
Wed 05 Jan 2011 12:50
Forum: dotConnect for Oracle
Topic: intermittent error "NET: Invalid SID"
Replies: 3
Views: 4467

intermittent error "NET: Invalid SID"

I'm getting "NET: Invalid SID" intermittently. I'm only making 1 connection and it should be closed by the using statement.

Here is my code

Code: Select all

using(OracleConnection conn = new OracleConnection(connectionString))
            {
                OracleCommand command = conn.CreateCommand();
                command.CommandText = sql;
                conn.Open();
                int aff = command.ExecuteNonQuery();                  
            }
Here is my connection string:

Code: Select all

Data Source=MyDbServer;Port=1521;SID=ORCL;Direct=true;User Id=system;Password=myPassword;
Here is the stack trace:

Code: Select all

 at Devart.Data.Oracle.DirectUtils.a(Int32 A_0)
   at Devart.Data.Oracle.br.a(String A_0, Int32 A_1, String A_2)
   at Devart.Data.Oracle.y.a(t A_0, av A_1)
   at Devart.Data.Oracle.OracleInternalConnection..ctor(t connectionOptions, OracleInternalConnection proxyConnection)
   at Devart.Data.Oracle.b0.a(l A_0, Object A_1, DbConnectionBase A_2)
   at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, l A_1, DbConnectionBase A_2)
   at Devart.Common.DbConnectionPoolGroup.a(DbConnectionPool A_0, DbConnectionBase A_1)
   at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
   at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
   at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
   at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
   at Devart.Common.DbConnectionBase.Open()
   at Devart.Data.Oracle.OracleConnection.Open()
   at xxx..OracleAdminRepository.ExecuteNonQuery(String sql, String connectionString) in D:\xxx.DAL\OracleAdminRepository.cs:line 223
   at xxx.OracleAdminRepository.CanMakeOracleConnection(String server, Int32 port, String SID, String user, String password, OracleUserConnectionMode connectionMode) in D:\xxx.OracleAdminRepository.cs:line 200
by joeu
Tue 04 Jan 2011 13:02
Forum: dotConnect for Oracle
Topic: do you recommend Direct=true?
Replies: 2
Views: 1067

do you recommend Direct=true?

do you recommend Direct connections?
What are the pros?
what are the cons?
Are you answers the same if using the Entity Framework?

Thanks
Joe
by joeu
Tue 12 Oct 2010 14:11
Forum: Entity Framework support
Topic: EF Model First and devart for both oracle and sql server
Replies: 5
Views: 2544

having everything quoted looks odd, can you explain why you decided to quote table names, column names etc?

How hard would it be to undo this?

if I remove the quotes in the script surely there is another file that pre-defines the quotes that are created during the construction of the queries that i would need to modify?

Thanks
Joe
by joeu
Tue 05 Oct 2010 14:28
Forum: Entity Framework support
Topic: EF Model First and devart for both oracle and sql server
Replies: 5
Views: 2544

so far i:
#created a model for sql

#copied the model objects to another model (oraModel) and used the devart .tt to generate a sql script

#edited the ssdl to remove the schema="MyUser"

#fixed the app.config to point to new ssdl

1. The sql script generated contained a schema name prefix on every table that was quoted and therefore not recognised,
1. Is there a way to stop this being quoted?
2. Is there a way to stop this being added in the first place?
3. Is there a better way to create the sql script?

4. Is there a way to stop the schema="MyUser" being added to the ssdl?

3. Why are the table names quoted in oracle? e.g tableA in Sql is "tableA" in Oracle

4. why are the column names quoted in oracle? e.g columnA in Sql is "columnA" in Oracle
by joeu
Fri 01 Oct 2010 16:23
Forum: Entity Framework support
Topic: EF Model First and devart for both oracle and sql server
Replies: 5
Views: 2544

EF Model First and devart for both oracle and sql server

How would i go about using the "Model first" approach that would work for both oracle and sql server?
(obviously i would like to create only one model that works for both)

Could i then create both db schemas from this?

thanks
joe
by joeu
Tue 31 Aug 2010 15:24
Forum: Entity Framework support
Topic: Using EF and devart for both oracle and sql server?
Replies: 12
Views: 5361

After changing the EntityContainer Name= I now get this error:
I did create the sql server ssdl using VS2010 and the oracle ssdl, msl and csdl using the devart-entity-developer. Should this work?

{"Schema specified is not valid. Errors: \r\nOracleModel.msl(7,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Int64[Nullable=False,DefaultValue=]' of member 'Categoryid' in type 'Northwind.Category' is not compatible with 'SqlServer.int[Nullable=False,DefaultValue=,StoreGeneratedPattern=Identity]' of member 'CategoryID' in type 'EntitiesSql.Store.Categories'.\r\nOracleModel.msl(34,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Int64[Nullable=False,DefaultValue=]' of member 'Employeeid' in type 'Northwind.Employee' is not compatible with 'SqlServer.int[Nullable=False,DefaultValue=,StoreGeneratedPattern=Identity]' of member 'EmployeeID' in type 'EntitiesSql.Store.Employees'.\r\nOracleModel.msl(57,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Int64[Nullable=False,DefaultValue=]' of member 'Employeeid' in type 'Northwind.Employeesterritory' is not compatible with 'SqlServer.int[Nullable=False,DefaultValue=]' of member 'EmployeeID' in type 'EntitiesSql.Store.EmployeesTerritories'.\r\nOracleModel.msl(58,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Int64[Nullable=False,DefaultValue=]' of member 'Territoryid' in type 'Northwind.Employeesterritory' is not compatible with 'SqlServer.int[Nullable=False,DefaultValue=]' of member 'TerritoryID' in type 'EntitiesSql.Store.EmployeesTerritories'."}
by joeu
Thu 26 Aug 2010 17:24
Forum: Entity Framework support
Topic: Using EF and devart for both oracle and sql server?
Replies: 12
Views: 5361

so i created the csdl msll and ssdl files for oracle using your entity developer
i created the sql files using vs2010.

i have used the orace files + the ssdl for sql and i get an error when trying to connect to the sql db.

can i mix and match vs2010 files with the entity developer files?
or do i need to create the sql files using dotconnect for sql? (i'd rather not)

any ideas?

here is the errror:

System.Data.MappingException

{"Schema specified is not valid. Errors: \r\nOracleModel.msl(3,4) : error 2002: The EntityContainer 'OracleNorthwindefEntitiesStoreContainer' for the storage model specified as part of this MSL does not exist in MetadataWorkspace."}

at System.Data.Mapping.StorageMappingItemCollection.Init(EdmItemCollection edmCollection, StoreItemCollection storeCollection, IEnumerable`1 xmlReaders, List`1 filePaths, Boolean throwOnError)
at System.Data.Metadata.Edm.MetadataCache.StoreMetadataEntry.LoadStoreCollection(EdmItemCollection edmItemCollection, MetadataArtifactLoader loader)
at System.Data.Metadata.Edm.MetadataCache.StoreItemCollectionLoader.LoadItemCollection(StoreMetadataEntry entry)
at System.Data.Metadata.Edm.MetadataCache.LoadItemCollection[T](IItemCollectionLoader`1 itemCollectionLoader, T entry)
at System.Data.Metadata.Edm.MetadataCache.GetOrCreateStoreAndMappingItemCollections(String cacheKey, MetadataArtifactLoader loader, EdmItemCollection edmItemCollection, Object& entryToken)
at System.Data.EntityClient.EntityConnection.LoadStoreItemCollections(MetadataWorkspace workspace, DbConnection storeConnection, DbProviderFactory factory, DbConnectionOptions connectionOptions, EdmItemCollection edmItemCollection, MetadataArtifactLoader artifactLoader)
at System.Data.EntityClient.EntityConnection.GetMetadataWorkspace(Boolean initializeAllCollections)
at System.Data.EntityClient.EntityConnection.InitializeMetadata(DbConnection newConnection, DbConnection originalConnection, Boolean closeOriginalConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
at OracleEntityFrameworkSpike.Program.Spike3() in D:\Code\Spikes\OracleEntityFrameworkSpike\OracleEntityFrameworkSpike\OracleEntityFrameworkSpike\Program.cs:line 33
at OracleEntityFrameworkSpike.Program.Main(String[] args) in D:\Code\Spikes\OracleEntityFrameworkSpike\OracleEntityFrameworkSpike\OracleEntityFrameworkSpike\Program.cs:line 17
at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
by joeu
Thu 19 Aug 2010 12:43
Forum: Entity Framework support
Topic: Using EF and devart for both oracle and sql server?
Replies: 12
Views: 5361

1. Can you explain how you would create the SSDL, CSDL, MSL?

2. if this is cut up the edmx file, is there another way?

3. Can you explain how you would do this in a code first approach?

Thanks again
by joeu
Wed 18 Aug 2010 17:25
Forum: Entity Framework support
Topic: Using EF and devart for both oracle and sql server?
Replies: 12
Views: 5361

Using EF and devart for both oracle and sql server?

Hi,

We are seriously considering purchasing your dotConnect for oracle.
I have a task to demonstrate to the business how the same code can be used for both oracle and sql server.

1. Have you got an example / instructions about how i would do this?

Currently i have created models for both sql and oracle but that means i have 2 of every type of object. (or i don’t create the code and have nothing on one side, including context)

2. Do i need the code first implementation to do this? (CTP4)
3. Does it work with code first and db first?

4. Also on the same theme, can you explain the use/differences between:
edmx
ssdl
csdl
msl

Thanks so much for your help in advance

Joe