What is the format to enter the TNS entry with a wallet to create a direct connection in the web.config?
TNS to Oracle Autonomous Database (Oracle cloud database)
TNS_NAME = (description= (retry_count=<put_count_here>)(retry_delay=<delay_here>)(address=(protocol=tcps)(port=<port>)(host=<oracle_cloud>))(connect_data=(service_name=<name_goes_here>))(security=(ssl_server_cert_dn="<cn_ou_and_more_goes_here>")(MY_WALLET_DIRECTORY=<path_to_wallet>)))
Current web.config (direct connect to local Oracle server):
User Id=my_user_id;Password=my_password;Server=myoracle.mycompany.com;Home=ora102;Direct=True;Sid=sid_here;Port=1234;Persist Security Info=True
Search found 10 matches
- Tue 09 Aug 2022 23:15
- Forum: dotConnect for Oracle
- Topic: Moving to Oracle cloud (Autonomous Database) - how to modify web.config connectionstring
- Replies: 1
- Views: 8334
- Tue 09 Aug 2022 22:54
- Forum: dbForge for Oracle
- Topic: Oracle Autonomous Database direct connection
- Replies: 1
- Views: 6502
Oracle Autonomous Database direct connection
Can dbForge for Oracle connect to an Oracle Autonomous Database via direct connect instead of using a TNS entry?
TNS_NAME = (description= (retry_count=<put_count_here>)(retry_delay=<delay_here>)(address=(protocol=tcps)(port=<port>)(host=<oracle_cloud>))(connect_data=(service_name=<name_goes_here>))(security=(ssl_server_cert_dn="<cn_ou_and_more_goes_here>")(MY_WALLET_DIRECTORY=<path_to_wallet>)))
TNS_NAME = (description= (retry_count=<put_count_here>)(retry_delay=<delay_here>)(address=(protocol=tcps)(port=<port>)(host=<oracle_cloud>))(connect_data=(service_name=<name_goes_here>))(security=(ssl_server_cert_dn="<cn_ou_and_more_goes_here>")(MY_WALLET_DIRECTORY=<path_to_wallet>)))
- Wed 18 Aug 2021 00:20
- Forum: dotConnect for Oracle
- Topic: How to set session data unit (SDU) size in direct connect mode?
- Replies: 1
- Views: 3107
How to set session data unit (SDU) size in direct connect mode?
Is it possible to set the SDU size in direct connect mode? I added an "SDU" parameter to my web.config but this does not work. My web.config is in the following format:
connectionString="User Id=donny;Password=secret;Server=sales;Home=ora102;Direct=True;Sid=oraclesid;;Persist Security Info=True;"
Here is an SDU example from the Oracle documentation:
sales.us.example.com=
(DESCRIPTION=
(SDU=11280)
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales.us.example.com))
)
Should the connection string be in a different format or should the SDU size be set somewhere else?
connectionString="User Id=donny;Password=secret;Server=sales;Home=ora102;Direct=True;Sid=oraclesid;;Persist Security Info=True;"
Here is an SDU example from the Oracle documentation:
sales.us.example.com=
(DESCRIPTION=
(SDU=11280)
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=sales.us.example.com))
)
Should the connection string be in a different format or should the SDU size be set somewhere else?
- Wed 06 Apr 2011 20:43
- Forum: LinqConnect (LINQ to SQL support)
- Topic: ExecuteQuery and properties
- Replies: 4
- Views: 3135
- Tue 05 Apr 2011 20:22
- Forum: LinqConnect (LINQ to SQL support)
- Topic: ExecuteQuery and properties
- Replies: 4
- Views: 3135
I have the identical behaviour with ExecuteQuery when defining my object fields as properties. Defining the fields as public variables work fine.
var query = ctx.ExecuteQuery("select STATUS from proposal");
foreach (var row in query)
{
string dummy = row.STATUS;
}
public class Thing
{
public string STATUS { get; set; } //does not work, but changing to a public variable works.
}
This throws the following error:
System.InvalidOperationException was unhandled by user code
Message=Field with name k__BackingField is not found in resultset.
Source=Devart.Data.Linq
StackTrace:
at Devart.Data.Linq.Provider.g.a(IDataRecord A_0, String A_1, DataSourceInfo A_2)
at lambda_method(ExecutionScope , b )
at Devart.Data.Linq.Provider.ObjectReader`1.g()
at Devart.Data.Linq.Provider.ObjectReader`1.b()
at Devart.Data.Linq.Provider.ObjectReader`1.MoveNext()
If I change ctx.ExecuteQuery to ctx.ExecuteQuery then it works fine, or changing the properties to public variables work too (public string STATUS). What was the solution to the original problem?
var query = ctx.ExecuteQuery("select STATUS from proposal");
foreach (var row in query)
{
string dummy = row.STATUS;
}
public class Thing
{
public string STATUS { get; set; } //does not work, but changing to a public variable works.
}
This throws the following error:
System.InvalidOperationException was unhandled by user code
Message=Field with name k__BackingField is not found in resultset.
Source=Devart.Data.Linq
StackTrace:
at Devart.Data.Linq.Provider.g.a(IDataRecord A_0, String A_1, DataSourceInfo A_2)
at lambda_method(ExecutionScope , b )
at Devart.Data.Linq.Provider.ObjectReader`1.g()
at Devart.Data.Linq.Provider.ObjectReader`1.b()
at Devart.Data.Linq.Provider.ObjectReader`1.MoveNext()
If I change ctx.ExecuteQuery to ctx.ExecuteQuery then it works fine, or changing the properties to public variables work too (public string STATUS). What was the solution to the original problem?
- Mon 04 Apr 2011 17:18
- Forum: dotConnect for Oracle
- Topic: Model not updating after dragging a table to designer
- Replies: 1
- Views: 1153
Model not updating after dragging a table to designer
I recently upgraded to the latest build of dotConnect for Oracle, but I now find that dragging a table or view onto the designer does not update the auto-generated code. I am running VS 2010, Win7 64 bit, and the latest dotconnect for Oracle (ver 6.10.126). Any ideas on why it's not auto-generating?
Also when right-clicking the .lqml file, there is no Custom Tool defined. I thought that this needs to be defined to auto-generate the code. There is no dropdown or ability to manually type "DevartLinqToSqlGenerator" into this field either (assuming this is the issue).
Update: generating the model externally using the Entity Developer works fine.
Also when right-clicking the .lqml file, there is no Custom Tool defined. I thought that this needs to be defined to auto-generate the code. There is no dropdown or ability to manually type "DevartLinqToSqlGenerator" into this field either (assuming this is the issue).
Update: generating the model externally using the Entity Developer works fine.
- Fri 18 Feb 2011 20:01
- Forum: dotConnect for Oracle
- Topic: How to get value of auto generated primary key after insert
- Replies: 4
- Views: 2539
How to get value of auto generated primary key after insert
I am trying to insert an new user into my user table. The userID column is a primary key generated from Oracle sequence. I set Auto Generated Value = true but I noticed that the userID always ends up as 0. Of course inserting a user via a sql insert does properly generate a new sequence value.
Later I also tried combinations of Auto-Sync, Read-Only, and even set IdGenerator to the name of the oracle sequence name. I didn't expect changing these properties from their defaults would work either but I couldn't find an online example so I wanted to try it out to make sure. I'm also using the latest dotConnect for Oracle 6.1
I'm sure I'm overlooking something obvious. Any ideas (of even better a link to the documentation covering this so I can teach myself).
On a related note, I need the userID value returned so I can use it in my many to many UserRoles table. Do I have to call SubmitChanges() to insert the user, get the userID, and then create the UserRoles record and call SubmitChanges() a 2nd time?
Later I also tried combinations of Auto-Sync, Read-Only, and even set IdGenerator to the name of the oracle sequence name. I didn't expect changing these properties from their defaults would work either but I couldn't find an online example so I wanted to try it out to make sure. I'm also using the latest dotConnect for Oracle 6.1
I'm sure I'm overlooking something obvious. Any ideas (of even better a link to the documentation covering this so I can teach myself).
On a related note, I need the userID value returned so I can use it in my many to many UserRoles table. Do I have to call SubmitChanges() to insert the user, get the userID, and then create the UserRoles record and call SubmitChanges() a 2nd time?
- Tue 16 Mar 2010 18:02
- Forum: LinqConnect (LINQ to SQL support)
- Topic: How to create a custom property not mapped to table column
- Replies: 3
- Views: 3687
Yep, that's where the code should go (and is). Still not sure what my problem is.
// This file is intended to be edited manually
using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Data;
using System.ComponentModel;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using System.Linq.Expressions;
namespace ProposalDataContext
{
partial class ProposalDataContext
{
// Place your implementation of partial extension methods here
}
public partial class ProposalProjectUser
{
public string WorkLocation
{
get { return "hello"; }
}
}
}
// This file is intended to be edited manually
using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Data;
using System.ComponentModel;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
using System.Linq.Expressions;
namespace ProposalDataContext
{
partial class ProposalDataContext
{
// Place your implementation of partial extension methods here
}
public partial class ProposalProjectUser
{
public string WorkLocation
{
get { return "hello"; }
}
}
}
- Fri 12 Mar 2010 20:00
- Forum: LinqConnect (LINQ to SQL support)
- Topic: How to create a custom property not mapped to table column
- Replies: 3
- Views: 3687
How to create a custom property not mapped to table column
In previous LINQ projects I often manually add new properties to existing auto-generated LINQ classes, using the magic of partial classes. These are straight Microsoft LINQ / SQL Server projects and I did *not* include an attribute for these properties. When I tried the same with my devart/Oracle LINQ project I got the following error:
Cannot find metainformation for property User.MyManuallyAddedProperty. Please check that the property is mapped to the table column.
It appears my new property must have an attribute set, so I included an attribute even though this property is not mapped to any database column:
[Column(Name = @"MyManuallyAddedProperty")]
I expected to get an oracle error:
ORA-00904: "T2"."MYMANUALLYADDEDPROPERTY": invalid identifier
I then changed the property attribute to:
[Column(IsDbGenerated = false)]
Which I hoped would indicate no database access, but yet another oracle error was thrown on runtime.
My question is how to I add a property that is *not* mapped to a column in the database?
Thank you,
Donald Lee-
Dept. of Energy - National Science Research Center
dotConnect for Oracle 5.60 Beta
*** Example partial class code *******************************
// This file is intended to be edited manually
public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
{
[Column(IsDbGenerated = false)] //error thrown if no attribute!
public string MyManuallyAddedProperty
{
get { return "hello"}
}
}
Cannot find metainformation for property User.MyManuallyAddedProperty. Please check that the property is mapped to the table column.
It appears my new property must have an attribute set, so I included an attribute even though this property is not mapped to any database column:
[Column(Name = @"MyManuallyAddedProperty")]
I expected to get an oracle error:
ORA-00904: "T2"."MYMANUALLYADDEDPROPERTY": invalid identifier
I then changed the property attribute to:
[Column(IsDbGenerated = false)]
Which I hoped would indicate no database access, but yet another oracle error was thrown on runtime.
My question is how to I add a property that is *not* mapped to a column in the database?
Thank you,
Donald Lee-
Dept. of Energy - National Science Research Center
dotConnect for Oracle 5.60 Beta
*** Example partial class code *******************************
// This file is intended to be edited manually
public partial class User : INotifyPropertyChanging, INotifyPropertyChanged
{
[Column(IsDbGenerated = false)] //error thrown if no attribute!
public string MyManuallyAddedProperty
{
get { return "hello"}
}
}
- Sat 08 Aug 2009 00:18
- Forum: dotConnect for Oracle
- Topic: Can not find Oracle home.
- Replies: 1
- Views: 1328
Can not find Oracle home.
I went through the sample console application and sucessfully reverse generated a couple example tables from my Oracle database, however when running the example code:
CrmDemoDataContext context = new CrmDemoData.CrmDemoDataContext();
var query = from it in context.PROPOSALs
orderby it.PROPOSAL_SERIAL_NUMBER
select it;
foreach ( PROPOSAL p in query)
{
Console.WriteLine("{0}", p.PROPOSAL_SERIAL_NUMBER);
}
I get the following error on the foreach...
"Can not find Oracle home."
This seems a bit surprising because there was no issue finding the hundreds of tables/views when I reverse engineered the database.
Does devart talk to the database via a different path when using the DevArt LINQ to SQL Modeling tool vs from plain code?
CrmDemoDataContext context = new CrmDemoData.CrmDemoDataContext();
var query = from it in context.PROPOSALs
orderby it.PROPOSAL_SERIAL_NUMBER
select it;
foreach ( PROPOSAL p in query)
{
Console.WriteLine("{0}", p.PROPOSAL_SERIAL_NUMBER);
}
I get the following error on the foreach...
"Can not find Oracle home."
This seems a bit surprising because there was no issue finding the hundreds of tables/views when I reverse engineered the database.
Does devart talk to the database via a different path when using the DevArt LINQ to SQL Modeling tool vs from plain code?