Times Ten LOB support - oracle11g

I have a passthrough connection in my c# application and I'm trying to do a select on a clob column which is in the database but not in-memory. But I get the following error, any ideas what I'm missing?
ORA-57000: TT5187: Caching LOBs from Oracle requires using an OCI client library provided by the TimesTen installation, or other versions of OCI client supported by TimesTen. -- file "bdbLob.c", lineno 224, procedure "ttBDbOraLobGetOraIdSnap"

As to Mat's comment above, I'm posting the solution for this problem. Created an entry in the config file as follows:
<oracle.dataaccess.client>
<settings>
<add name="DllPath" value="C:\oracle\bin"/>
<add name="FetchSize" value="65536"/>
<add name="PromotableTransaction" value="promotable"/>
<add name="StatementCacheSize" value="10"/>
</settings>
Dllpath is all that is needed to resolve the dll path.

Related

Error 175: The specified store provider cannot be found in the configuration, or is not valid. SQLlite

I have joined to existed project, and when try to build solution get Error 175: The specified data store provider cannot be found, or is not valid. in few projects. All of that are linked to different edmx files, and in all files all code after <edmx:StorageModels> are marked as error.
Example of edmx file:
<edmx:StorageModels>
<Schema Namespace="AWareDBModel.Store" Alias="Self" Provider="System.Data.SQLite" ProviderManifestToken="ISO8601" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
<EntityContainer Name="AWareDBModelStoreContainer">
p.s I am using vs 2012
I am not sure that is correct, but I have pasted this line
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139"/>
to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config and error disappear

Setup Elmah with MySQL?

I have run the Elmah nuget package, copied the mysql.data.dll to the bin folder and run the mySQL script in the database but where do I state the address and login to the database?
Best regards
If you've already installed Elmah and created the tables in your database all your should need to do now is make sure the tables have the correct permissions then edit the connection string for Elmah in your web.config to include the username and password for whatever account you'll access the DB from the same as any other connection string but using the MysqlClient
In your web.config you should have something similar to:
<elmah>
<errorLog type="Elmah.MySqlErrorLog, Elmah" connectionStringName="Elmah.MySql" />
<security allowRemoteAccess="1" />
</elmah>
And also elsewhere in the connection strings bit something along the lines of:
<connectionStrings>
<add name="Elmah.MySql" connectionString="[STUFF HERE];User ID=[WHATEVER];Password=[WHATEVER];" providerName="System.Data.MySqlClient" />
</connectionStrings>

Have connection strings as well as common config source in asp.net or wcf websites

Hi I am looking for a solution where I have some common connection strings which I have
a common connections strings file but also need some specific add and remove connection strings in some sites...but do not see a way to do it...
<configuration>
<connectionStrings configSource="connections.config">
<remove name="AppConnectionString" />
<add name="AppConnectionString" connectionString="data source=(local);initial catalog=xyz;integrated security=True;MultipleActiveResultSets=True;" />
<connectionStrings/>
</configuration>
With file connections.config containing
<connectionStrings>
<add name="name" connectionString="conn_string" providerName="System.Data.SqlClient" />
<add name="name2" connectionString="conn_string2" providerName="System.Data.SqlClient" />
</connectionStrings>
Thanks,
Bala
If this does not work as you have expressed it above (which is a shame in my opinon), you have a number of other options:
Include the common connection strings in the connection string config, and then use the application settings config for the app-specific connection strings.
As an alternative, use a custom configuration file for the app-specific connection strings and load it in for each app.
When you build your apps inject the correct connection string keys into the config file using something like powershell. This script can run as a post build task in your build script.
Otherwise, when you package or stage your release, ask the release team to run the script as a manual step (or add it into your deployment script).

Pre-Generating views to improve query performance in Entity Framework

I am trying to pre-generate view metadata for my Entity Framework project and have run across a problem on the last step when using this resource:
http://msdn.microsoft.com/en-us/library/bb896240.aspx
Everything else is compiling great, but I'm getting an error when I run my application, and I suspect it's due to a problem with the final step, 're-adding mapping and model files as embedded resources for ASP.NET projects.'
I'm receiving 'Unable to load the specified metadata resource.' and my connection string is as follows:
<add name="myEntities"
connectionString="metadata=
.\DataStructure.csdl|
.\DataStructure.ssdl|
.\DataStructure.msl;provider=System.Data.SqlClient;provider
connection string="Data Source=x;Initial Catalog=x;Persist Security Info=True;User ID=x;Password=x;MultipleActiveResultSets=True""
providerName="System.Data.EntityClient" />
It is suggested in the document that my connection string file should include the following but haven't been able to get it right in any configuration:
Metadata=res://<assemblyFullName>/<resourceName>;
Metadata=res://*/<resourceName>;
Metadata=res://*;
Assuming my assembly name is DataStructure.EF, how should my string be constructed?
http://msdn.microsoft.com/en-us/library/cc716756.aspx
<connectionStrings>
<add name="AdventureWorksEntities"
connectionString="metadata=.\AdventureWorks.csdl|.\AdventureWorks.ssdl|.\AdventureWorks.msl;
provider=System.Data.SqlClient;provider connection string='Data Source=localhost;
Initial Catalog=AdventureWorks;Integrated Security=True;Connection Timeout=60;
multipleactiveresultsets=true'" providerName="System.Data.EntityClient" />
</connectionStrings>
I compiled a full guide for anybody else having problems and published it here: http://kewney.com/posts/software-development/pre-generating-views-to-improve-query-performance-in-aspnet-mvc-3-entity-framework

Membership provider name and type for Microsoft WebMatrix's sample Template

What is the membership provider name and type is used in the Microsoft Webmatrix's template site? In the web.config it is not given. When I run it locally, the template works but when I publish, it gives the following error:
Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
Source Error:
Line 239: <providers>
Line 240: <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, ....
Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config Line: 240
Any help will be appreciated.
The Database used in the application is SQLCE4.
Web Pages uses the SimpleMembershipProvider which is located in WebMatrix.WebData.
I don't believe there's a default Membership provider that supports SQL Server Compact Edition 4. There is a Membership provider implementation that does out on CodePlex: http://sqlcemembership.codeplex.com/
So, if you're using that already, then ensure that you have a connection string defined in your config file, like so:
<connectionStrings>
<add name="LocalSqlServer"
connectionString="data source=|DataDirectory|\YourDatabaseName.sdf"/>
</connectionStrings>
And your provider specified in your config should define the connectionStringName attribute and reference the connection string's name defined in the <connectionStrings> block, like this:
<providers>
<clear/>
<add name="SqlCeMembershipProvider"
type="ErikEJ.SqlCeMembershipProvider"
connectionStringName="LocalSqlServer"
.... />
</providers>
A config sample is provided with that SQL CE 4 Membership provider on the main project page.

Resources