Note that there are some explanatory texts on larger screens.

plurals
  1. POSUBSONIC MYSQL SharedDbConnectionScope TransactionScope
    primarykey
    data
    text
    <p>The next code runs normally in SQLSERVER but when i change the web.config to runs with mySQL after the <strong>loadbykey</strong> the connection is closed.</p> <p>is there any configuration to make in MYSQL to change that ???</p> <p>thanks any help !!!</p> <pre><code> //----------------------------------------------------------- string tipoBanco = System.Configuration.ConfigurationManager.AppSettings["tipoBanco"]; string conexao = System.Configuration.ConfigurationManager.ConnectionStrings[tipoBanco].ToString(); using (SharedDbConnectionScope scope = new SharedDbConnectionScope(conexao)) { //----------------------------------------------------------- using (TransactionScope ts = new TransactionScope()) { Cargo c = new Cargo(); c.LoadByKey(9999); SubSonic.StoredProcedure sp = null; sp = new SubSonic.StoredProcedure("sp_test"); sp.Command.AddParameter("paramTabela", "zzz", DbType.AnsiStringFixedLength, null, null); Convert.ToInt32(sp.ExecuteScalar()); } } </code></pre> <p><strong>the web.config</strong></p> <pre><code>&lt;SubSonicService defaultProvider="mysql" enableTrace="false" templateDirectory=""&gt; &lt;providers&gt; &lt;clear/&gt; &lt;add name="mysql" type="SubSonic.MySqlDataProvider, SubSonic" regexDictionaryReplace="Empresaendereco,EmpresaEndereco;Empresacontato,EmpresaContato;Franqueadoendereco,FranqueadoEndereco;Franqueadocontato,FranqueadoContato;Funcionarioacesso,FuncionarioAcesso;Funcionarioendereco,FuncionarioEndereco;Funcionariocontato,FuncionarioContato;Clienteendereco,ClienteEndereco;Clientecontato,ClienteContato;Clientehistorico,ClienteHistorico;Agendastatus,AgendaStatus;Historicostatus,HistoricoStatus" fixDatabaseObjectCasing="true" connectionStringName="mysql" generateRelatedTablesAsProperties="true" fixPluralClassNames="false" generatedNamespace="ModeloDados" regexIgnoreCase="true" removeUnderscores="false" setPropertyDefaultsFromDatabase="true" generateNullableProperties="true" useExtendedProperties="true" useUtc="true" /&gt; &lt;/providers&gt; &lt;/SubSonicService&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload