Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all 1350 articles
Browse latest View live

Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

$
0
0

Error #1: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Question:  What is causing this problem? And how to fix this issue please let me know the details.


We are trying to use SQLite database in C# Application, to develop a C# application I am using Visual Studio 2015, System.Data.SQLite Version 1.0.108.
After building the project I am facing the following issue.


Need help on query from multiple tables using group by clause

$
0
0

Hi,

Trying to get the below result in query using group by from below 3 tables. if you notice there are two items in table 1. one item with color one another black. i thing we may use max(), min() function.

Result:

PROJECT_NUMINSPECT_DATEDEFI_CODELIFE_SAFETYON_PRIOR_REPREPAIR_TIME
6000026/8/2018C*Y10
6000026/8/2018C*Y8

Table1:

PROJECT_NUMBUILDING_IDINSPECT_DATEPHY_CONDCOND_CATEGORYDEFI_CODELIFE_SAFETYON_PRIOR_REPREPAIR_TIME
60000225596/8/2018EXTERIORParapetsC*N10
60000225596/8/2018EXTERIORFoundation WallsMY8
60000225596/8/2018EXTERIORFacadeMN5
60000225596/8/2018EXTERIORRoofsMN5
60000225596/8/2018EXTERIORFlashingC*N8
60000225596/8/2018EXTERIORDrainsM*Y4
60000225596/8/2018EXTERIORVents

Table2:

CATEGORY_IDCOND_CATEGORYITEM_INSPECTEDCREATION_DATELAST_UPDATE_DATE
1Parapets1
2Facade1
3Foundation walls1
4Roofs2
5Flashing2
6Drains2
7Vents2

Table3:

ITEM_INSPECTEDITEM_DESCRIPTIONITEM_CATEGORYCREATION_DATELAST_UPDATE_DATE
1Exterior Walls and foundationExterior Items Inspected
2Roofs, flashing, ventsExterior Items Inspected
3Gutters, Downspouts, splash blocksExterior Items Inspected
4Drives, parking lots, curbsExterior Items Inspected
5Walks, steps, guardrailsExterior Items Inspected
6Fences, walls, gatesExterior Items Inspected

Trying to merge multiple tables and group by

$
0
0

Hi,

i need help to query below all 4 tables and finally grouped by ITEM_INSPECTED. so basically trying to get one row instead of three row from condition table. so far i was able to query only condition table using below script but i want to merge all tables and result will be like below.

PROJECT_NUMBERPHYSICAL_INSPECT_DATEPHY_CONDCATEGORYDEFICIENCY_CODELIFE_SAFETYON_PRIOR_REPREPAIR_TIME
6000026/8/2018EXTERIORFlashingC*Y8

select project_num,physical_inspect_date,min(deficiency_code), max(life_safety),max(on_prior_rep),max(repair_time)
from CONDITION
where project_num='600002' and physical_inspect_date='8-JUNE-2018'
group by project_num,physical_inspect_date

CONDITION:

PROJECT_NUMBERPHYSICAL_INSPECT_DATECATEGORYDEFICIENCY_CODELIFE_SAFETYON_PRIOR_REPREPAIR_TIMEDEFICIENCY_ID
6000026/8/2018FlashingC*N824
6000026/8/2018DrainsM*Y427
6000026/8/2018VentsCN630

COND_DEFICIENCY:

DEFICIENCY_IDCATEGORY_IDDEFICIENCY
245Repair damaged aluminum counter flashing
276Replace missing drain caps
307Repair the damaged vent cover located

COND_CATEGORY:

CATEGORY_IDCATEGORYITEM_INSPECTED
5Flashing2
6Drains2
7Vents2

ITEMS_CATEGORY:

ITEM_INSPECTEDITEM_DESCRIPTIONITEM_CATEGORY
2Roofs, flashing, ventsExterior Items Inspected

ASPNETCORE2.0 MYSQL CONNECTION PROBLEM -- please help.

$
0
0

Hello.. I'm working on an ASP net core 2.0 mvc 5 Project and I'm having problems on trying to connect to an online mysql database.

I Will share all the information I get from the website that provides free database hosting service, becouse they r not precious anyways, and just for testing...

I will be really thankfull if someone could help me... I'm running out of time and I'm yet to start the project.

Thank you already.

------------------------------------

Your account number is: 288396

Your new database is now ready to use.

To connect to your database use these details

Server: sql7.freemysqlhosting.net
Name: sql7238434
Username: sql7238434
Password: 4qjcgJuxxU
Port number: 3306

appsettings.json

"ConnectionStrings": {

"DefaultConnection": "server=sql7.freemysqlhosting.net;port=3306;database=sql7238434;uid=sql7238434;password=4qjcgJuxxU"
},
"Logging": {
"IncludeScopes": false,
"LogLevel": { "Default": "Warning" }
}
}

CONTEXT.CS

public class HerseyinContext
{
public string ConnectionString { get; set; }
public HerseyinContext(string connetionString)
{
this.ConnectionString = ConnectionString;

}
private MySqlConnection GetConnection()
{
return new MySqlConnection(ConnectionString);
}


public List<Users> GetAllUsers()
{
List<Users> list = new List<Users>();
using (MySqlConnection conn = GetConnection())
{
conn.Open(); ---------HERE I GET THE ERORR! -->MySql.Data.MySqlClient.MySqlException: 'Host 'ASUS' is not allowed to connect to this MariaDB server'
MySqlCommand cmd = new MySqlCommand("select * from Users", conn);
using (var reader = cmd.ExecuteReader())
{
while (reader.Read())
{

list.Add(new Users()
{
ID = Convert.ToInt32(reader["ID"]),
USERNAME = reader["USERNAME"].ToString(),
PASSWORD = reader["PASSSWORD"].ToString()
});


}
}
return list;
}
}


}

Length function into oracle and sql

$
0
0

Hi
I have a simple problem into my database I use length function that determines length of string into sql and oracle both.
now I pass my data from sql to oracle so into sql I check the length of charecters same I will do into oracle also
but when my string has some Unicode charecters the length of that charecters are shown differently into the oracle and sql

into sql

select Len('⻩');   

ans=1

into oracle

SELECT LENGTH('⻩'') "Length in characters"
   FROM DUAL;

ans=3

how can I remove inconsistency ?

how can I make same ans into sql because I have control over sql and does not have control over oracle database

Like in Mysql - how to do it

$
0
0

Hi

I need to execute one like on mysql database. My best shot was:

s.SelectParameters.Clear();
        s.SelectCommand = "select * from perfumes where routelink like concat('%',?,'%') LIMIT 15";
        s.SelectParameters.Add("@a", txtPesquisa.Text);
        s.DataBind();

The problem is if I want to search two words like night flight it doesn't work. It only works if I search with one word.

Any help?

wrong number or types of arguments in call

$
0
0
All-- Please help. I keep getting the RTE "ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call" when I try to use Oracle and stored procedure and a DataAdapter. The C# and the SQL code is below and it really seems to be pretty much the same as the "standard" Microsoft example at... http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q322160&ID=KB;EN-US;Q322160 ...so, I really need some assistance. Any ideas? Please advise. Notes-- I must use a DataAdapter. The table does exist. The connection is open. The connection string is valid. The database user has sufficient permissions. Here is the C# code...public void LoadAllEx(OracleConnection p_OpenConnection) { DataTable myDataTable; OracleDataAdapter myOracleDataAdapter; System.Data.OracleClient.OracleCommand myOracleCommand; myOracleCommand = new System.Data.OracleClient.OracleCommand(); myDataTable = new DataTable(); myOracleCommand.Connection = p_OpenConnection; myOracleCommand.CommandText = "LOD_JUR_SELALL"; myOracleCommand.CommandType = CommandType.StoredProcedure; myOracleCommand.Parameters.Add(new OracleParameter("LOD_CURSOR", OracleType.Cursor)).Direction = ParameterDirection.Output; myOracleDataAdapter = new OracleDataAdapter(myOracleCommand); //Code breaks here with RTE="ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'LOD_JUR_SELALL'" myOracleDataAdapter.Fill(dataTable); } Here is the SQL proc code.... CREATE OR REPLACE PROCEDURE LOD_JUR_SELALL ( outCursor OUT LOD.LOD_CURSOR ) IS BEGIN OPEN outCursor FOR SELECT JURISDICTIONCODE, NAME, EXTRACTDATE, STATUS, ALIAS, CERT_CYCLE, JUR_TYPE_ID, LEA_CODE, COUNTY_CODE, KOC_ID FROM JURISDICTION ; END LOD_JUR_SELALL; / Here is the cursor defintion code...CREATE OR REPLACE PACKAGE "LOD" AS TYPE LOD_CURSOR IS REF CURSOR; END LOD; /

Connecting to Oracle Database

$
0
0

Background:

We have an Oracle 12c database used to support 3rd party vendor products. We are planning to develop a web application in .NET to connect to the Oracle database.

I have reviewed the Quickstart video on the Oracle website. It looks like they suggests installing Oracle client, use ODP.NET to connect via EZConnect. This looks like the DB server information will be on theweb.config file. Does this present any security risks? Also, does that mean installing Oracle client on the web server?

Questions:

Since I'm an Oracle DBA and not a .NET Developer at all, I thought I'll post here to pick the gurus' minds.

  1. What are the alternatives (if any) to the method mentioned above?
  2. Is there a better alternatives? What is common within the .NET community?

Appreciates any information.

Thank you.


How to connect to MySQL Database on another server?

$
0
0

Hello everybody, I have ASP.NET MVC C# Web Aplication ready, with MSSQL database, but I need to connect to MySQL Database on another server for some Clients information and display it on my website. How can I do this?

I need at least any idia, because never done this.

Is it better to copy this clients information to my database, because it is more then 3000 clients?

How to mantain up to date copy of two databases?

Thank you for your help.

Excel Sheet

$
0
0

hi

  How to add data to existing Excel Sheet in a particular folder & Then Save the file. 

Thanks

Designing a field which points to another table

$
0
0

I have a master table, where i want a field "Languages".

This field "Languages" should point to another table which contains the list of the languages.

Is it possible to design this way.

Reason i am asking is.. I am adding 8 fields for the languages known in the master table, which may or may not be filled.

So i want to have one field pointing to another table.

Excel File

$
0
0

Hi

  I have below code to add data to existing Excel file . After adding data i want to Save this file. Secondly what is the purpose of object misvalue.

 

          Excel.Application xlApp;
            Excel.Workbook xlWorkBook;
            Excel.Worksheet xlWorkSheet;
            object misValue = System.Reflection.Missing.Value;
            xlApp = new Excel.Application();
            xlWorkBook = xlApp.Workbooks.Open("G:\\Test.xlsx");
            xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
            myConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["conString"].ToString();
            cnn = new SqlConnection(myConnectionString);
            cnn.Open();
            sql = "SELECT * FROM [dbo].[Tbl_Test]";
            SqlDataAdapter dscmd = new SqlDataAdapter(sql, cnn);
            DataSet ds = new DataSet();
            dscmd.Fill(ds);
            for (i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
            {
                for (j = 0; j <= ds.Tables[0].Columns.Count - 1; j++)
                {
                    data = ds.Tables[0].Rows[i].ItemArray[j].ToString();
                    xlWorkSheet.Cells[i + 1, j + 1] = data;
                }
            }
            xlWorkBook.Close(true, misValue, misValue);
            xlApp.Quit();

Thanks

Problem to access pgAdmin

"Connection request timed out" string (Error)

$
0
0

Friends, good afternoon! I am getting the following error message:

Message "Connection request has timeout". + OracleLogicalTransaction {Oracle.ManagedDataAccess.Client.OracleLogicalTransaction} Oracle.ManagedDataAccess.Client.OracleLogicalTransaction. Source: "Oracle Data Provider for .NET, Managed Driver" string. ($ exception) .StackTrace: in at OracleInternal.ConnectionPool.PoolManager`3.Get (ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, CriteriaCtx CriteriaCtx, String affinityInstanceName, Boolean bForceMatch) in OracleInternal.ConnectionPool.OraclePoolManager.Get (ConnectionString csWithNewPassword, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch) in OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get (ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, CriteriaCtx criteriaCtx) in Oracle.ManagedDataAccess.Client.OracleConnection.Open () in NHibernate.Connection.DriverConnectionProvider.GetConnection ()

in NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare () in NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords (Dialect dialect, IConnectionHelper connectionHelper) in NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update (ISessionFactory sessionFactory) in NHibernate.Impl.SessionFactoryImpl..ctor (Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners)

em NHibernate.Cfg.Configuration.BuildSessionFactory() em SDPJDominio.DataAccess.NhibernateHelper.HelpThreading() na D:\Repositório SVN\SDP\SDPJ\branches\SDPJ-V3.1.0\SDPJ-102\SDPJDominio\DataAccess\NhibernateHelper.cs:linha 41 em SDPJView.ImportacaoProcessoView.ImportacaoProcesso.<>c__DisplayClass20_0.<ProcessamentoTabela>b__0(Object dados) na D:\Repositório SVN\SDP\SDPJ\branches\SDPJ-V3.1.0\SDPJ-102\SDPJView\ImportacaoProcessoView\ImportacaoProcesso.aspx.cs:linha 209 em System.Threading.Tasks.Task.InnerInvoke() em System.Threading.Tasks.Task.Execute()

DataAccess, NhibernateHelp:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mapping.Attributes;
using NHibernate.Cfg;
using NHibernate;
using System.IO;
using NHibernate.Context;
using System.Reflection;
using Oracle.ManagedDataAccess.Client;

namespace SDPJDominio.DataAccess
{
    public class NhibernateHelper
    {
        private ISessionFactory sessionFactory;


        public static ISession GetSession ()
        {
            if (! CurrentSessionContext.HasBind (Instance.GetSessionFactory ()))
                CurrentSessionContext.Bind (Instance.GetSessionFactory (). OpenSession ());
            
            return Instance.GetSessionFactory (). GetCurrentSession ();
        }
        
        public static ISessionFactory HelpThreading ()
        {
            MemoryStream stream = new System.IO.MemoryStream ();
            HbmSerializer.Default.Validate = true;
            //HbmSerializer.Default.Serialize(stream, AppDomain.CurrentDomain.GetAssemblies () .Where (w => w.FullName.Contains ("SDPJDomain").) FirstOrDefault ());
            HbmSerializer.Default.Serialize (stream, System.Reflection.Assembly.GetExecutingAssembly ());
            stream.Position = 0;
            Configuration configuration = new Configuration ();
            configuration.Configure ();
            configuration.SetProperty ("connection.connection_string", ConfigNhibernate.getConfig ());
            configuration.SetProperty ("current_session_context_class", "thread_static");
            configuration.AddInputStream (stream);
            stream.Close ();
            Instance.sessionFactory = configuration.BuildSessionFactory ();
            return Instance.sessionFactory;
        }

public NhibernateHelper ()
        {
            MemoryStream stream = new System.IO.MemoryStream ();
            HbmSerializer.Default.Validate = true;
            HbmSerializer.Default.Serialize (stream, System.Reflection.Assembly.GetExecutingAssembly ());
            stream.Position = 0;
            Configuration configuration = new Configuration ();
            configuration.Configure ();
            configuration.SetProperty ("connection.connection_string", ConfigNhibernate.getConfig ()); // add this line
            configuration.AddInputStream (stream);
            stream.Close ();

            sessionFactory = configuration.BuildSessionFactory ();
        }

        public static ISessionFactory SessionFactory
        {
            get {return Instance.sessionFactory; }
        }

        private ISessionFactory GetSessionFactory ()
        {
            return sessionFactory;
        }

        public static NhibernateHelper Instance
        {
            get
            {
                return CreateSessionGenerator.
            }
        }

        public static ISession OpenSession ()
        {
            return Instance.GetSessionFactory (). OpenSession ();
        }

        public static void ReloadSession (object obj)
        {
            SessionRefresh (obj);
        }

        public static ISession SessionCurrent
        {
            get
            {
                
                if (! CurrentSessionContext.HasBind (Instance.GetSessionFactory ()))
                    return null;
                return Instance.GetSessionFactory (). GetCurrentSession ();
            }
        }

        class CreateSessionKey
        {
            internal static readonly NhibernateHelperSession Manager = new NhibernateHelper ();
        }


    }
}

line: 209

Action <object> processing = (data) =>
            {
                NHibernate.Context.ThreadStaticSessionContext.Bind (NhibernateHelper.HelpThreading (). OpenSession ());
                }

WebConfig:

<?xml version="1.0" encoding="utf-8"?><configuration><configSections><section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" /><sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"><section name="SDPJView.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /></sectionGroup><sectionGroup name="businessObjects"><sectionGroup name="crystalReports"><section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null" /><section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" /></sectionGroup></sectionGroup><section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" /></configSections><extnet theme="Gray" /><location path="Content/temp"><system.web><authorization><allow users="?" /></authorization></system.web></location><location path="Content/css"><system.web><authorization><allow users="?" /></authorization></system.web></location><location path="Content/img_SDPJ"><system.web><authorization><allow users="?" /></authorization></system.web></location><location path="Autenticacao">  <system.web><authorization><allow users="?" /></authorization></system.web></location><appSettings><add key="CodigoSistema" value="SDPJ" /><add key="CodigoModulo" value="INTRANET" /><add key="CrystalImageCleaner-AutoStart" value="true" /><add key="CrystalImageCleaner-Sleep" value="60000" /><add key="CrystalImageCleaner-Age" value="120000" /></appSettings><connectionStrings><add name="ADConnectionString" connectionString="LDAP://net.sefaz.es.gov.br" /><add name="ConnectionString" connectionString="DATA SOURCE=DAPP;PASSWORD=A#$##$$;USER ID=APL_SDP" providerName="Oracle.DataAccess.Client" /></connectionStrings><businessObjects><crystalReports><rptBuildProvider><add embedRptInResource="true" /></rptBuildProvider><crystalReportViewer><add key="ResourceUri" value="../../aspnet_client/system_web/4_0_30319/crystalreportviewers13" /></crystalReportViewer></crystalReports></businessObjects><system.web><!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        --><siteMap defaultProvider="XmlSiteMapProvider" enabled="true"><providers><add name="XmlSiteMapProvider" description="Default SiteMap provider" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Content/Navigation.sitemap" securityTrimmingEnabled="true" /></providers></siteMap><compilation debug="true"><assemblies><add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /><add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /><add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /><add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.ReportSource, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.Shared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /><add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /><add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /><add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /></assemblies></compilation><globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="pt-br" /><!--<globalization enableClientBasedCulture="false" requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="iso-8859-1" responseHeaderEncoding="utf-8" resourceProviderFactoryType="string" enableBestFitResponseEncoding="true" culture="pt-BR" uiCulture="pt-BR"/>--><!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        --><authorization><deny users="?" /></authorization><authentication mode="Forms"><forms loginUrl="~/Autenticacao/Login.aspx" timeout="20" defaultUrl="~/Default.aspx" slidingExpiration="true" /></authentication><sessionState timeout="10" /><machineKey validationKey="C50B3C89CB21F4F1422FF158A5B42D0E8DB8CB5CDA1742572A487D9401E3400267682B202B746511891C1BAF47F8D25C07F6C39A104696DB51F17C529AD3CABE" decryptionKey="8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F" validation="SHA1" /><membership defaultProvider="SDPJMembershipProvider"><providers><clear /><add name="SDPJMembershipProvider" type="SDPJView.Seguranca.SDPJMembershipProvider" connectionStringName="ADConnectionString" writeExceptionsToEventLog="false" applicationName="/SDPJView" /></providers></membership><!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"><error statusCode="403" redirect="NoAccess.htm" /><error statusCode="404" redirect="FileNotFound.htm" /></customErrors>
        --><customErrors mode="Off" /><!--<pages validateRequest="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>--><pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID"><controls><add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" /></controls></pages><httpHandlers><add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" /><add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /></httpHandlers><httpModules><add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" /></httpModules><httpRuntime maxRequestLength="102400" /></system.web><!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    --><system.webServer><httpErrors errorMode="Detailed" /><asp scriptErrorSentToBrowser="true" /><validation validateIntegratedModeConfiguration="false" /><modules runAllManagedModulesForAllRequests="true"><add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" /></modules><handlers accessPolicy="Read, Execute, Script"><add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" /><add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" /><add name="AboMapperCustom-9501872-V4" path="*.axd" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" /><add name="AboMapperCustom-9501871-V4.0" path="*.aspx" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" /><add name="AboMapperCustom-9501870-V4.0" path="*.asmx" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" /><add name="AboMapperCustom-9501869-V4.0" path="*.ashx" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" /><add name="AboMapperCustom-9501868-V4.0" path="*.ascx" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" /><add name="AboMapperCustom-9501867-V4.0" path="*.asax" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" /><add name="ScriptResource" path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" /></handlers></system.webServer><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="AjaxControlToolkit" publicKeyToken="28f01b0e84b6d53e" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-3.0.30930.28736" newVersion="4.1.50508.0" /></dependentAssembly><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" /><bindingRedirect oldVersion="1.0.0.0-4.5.10" newVersion="4.5.11" /></dependentAssembly><dependentAssembly><assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" /><bindingRedirect oldVersion="0.0.0.0-2.2.0" newVersion="2.2.1" /></dependentAssembly><dependentAssembly><assemblyIdentity name="Transformer.NET" publicKeyToken="e274d618e7c603a7" /><bindingRedirect oldVersion="0.0.0.0-2.1.0" newVersion="2.1.1" /></dependentAssembly><dependentAssembly><publisherPolicy apply="no" /><assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" /></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.CrystalReports.Engine" publicKeyToken="692fbea5521e1304" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-13.0.2000.0" newVersion="13.0.2000.0" /></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.Shared" publicKeyToken="692fbea5521e1304" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-13.0.3500.0" newVersion="13.0.3500.0" /></dependentAssembly><dependentAssembly><assemblyIdentity name="CrystalDecisions.ReportSource" publicKeyToken="692fbea5521e1304" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-13.0.2000.0" newVersion="13.0.2000.0" /></dependentAssembly><dependentAssembly><assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.4000" newVersion="4.1.0.4000" /></dependentAssembly><dependentAssembly><assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /></dependentAssembly><dependentAssembly><assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" /><bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" /></dependentAssembly></assemblyBinding></runtime><system.serviceModel><bindings><basicHttpBinding><binding name="IntegrationWSBindingP" closeTimeout="00:10:50" openTimeout="00:10:05" receiveTimeout="00:10:05" sendTimeout="00:10:05" maxReceivedMessageSize="10000000"><security mode="Transport" /></binding><binding name="IntegrationWSBindingH" closeTimeout="00:10:50" openTimeout="00:10:05" receiveTimeout="00:10:05" sendTimeout="00:10:05" maxReceivedMessageSize="10000000" /></basicHttpBinding></bindings><client><endpoint address="https://portalinternet.banestes.com.br/br.com.banestes.djw.integration.server/IntegrationWSPort" binding="basicHttpBinding" bindingConfiguration="IntegrationWSBindingP" contract="IntegracaoBanestesProducao.IntegrationWS" name="IntegrationWSPort" /><endpoint address="http://portalinternet.h.banestes.com.br/br.com.banestes.djw.integration.server/IntegrationWSPort" binding="basicHttpBinding" bindingConfiguration="IntegrationWSBindingH" contract="IntegracaoBanestesHomologacao.IntegrationWS" name="IntegrationWSPort1" /></client><serviceHostingEnvironment aspNetCompatibilityEnabled="true" /><standardEndpoints><webScriptEndpoint><standardEndpoint name="" crossDomainScriptAccessEnabled="true" /></webScriptEndpoint></standardEndpoints></system.serviceModel></configuration>

Display only the columns the user selects

$
0
0

I have a two tables, GuestList and CustomerList. I joined them and used dynamic SQL pivot table to convert the 'city' column from GuestList table into rows or table headers and the average population would be displayed under each city and 'Id' has three values, 1, 2,3 and each city has all these three ID's. So after executing the query at the bottom, my table header looks like this and the average population is displayed under each city.

Time| Atlanta_1| Atlanta_2| Atlanta_3| NY_1| NY_2| NY_3| LA_1| LA_2| LA_3

I want to display only the columns the user selects. So if the user selects Atlanta_1, NY_2, LA_1, only these three columns will be displayed along with the time, nothing else. I can create a nvarchar parameter in my stored procedure for the string of the columns the user is going to select but what changes would I need to make in my query just to display the selected columns instead of all? Could somebody help me with this please.

declare@ColumnNames nvarchar(max)=''declare@SQL nvarchar(max)=''select@ColumnNames += QUOTENAME(a.address+'_'+Convert(Varchar(10),a.Id ))+','from GuestList as a
innerjoin CustomerList as bon a.Id = b.Id
groupby a.address
orderby a.address set@ColumnNames =left(@ColumnNames, LEN(@ColumnNames)-1)set@SQL= N'
select Time,'+@ColumnNames +'
from 
(
select a.Time, a.address+'_'+Convert(Varchar(10),a.Id ) as City, a.population, b.Gender    
from GuestList as a
inner join CustomerList as b
on a.Id = b.Id
inner join Split(@city, '','') as c
on a.city = c.Data
where a.city = c.Data
) as SourceTable
pivot
(avg(population) 
for city 
in ('+@ColumnNames +'))as PivotTable

Web API model to connect to Oracle server and execute Unix commands

$
0
0

Hi,

I am trying to create a web application wherein some of the oracle commands can be done without logging into the server and then executing it from a web application.

I am trying to connect to oracle server and then execute unix shell commands. Is this possible without using any 3rd party plugins/ tools ? If yes, how to achieve it?

Thanks

ODBC excecption?

$
0
0

Hi,

i am receiving below error when trying to make connection with oracle. what could be the solution?

ERROR [08S01] [Microsoft][ODBC driver for Oracle][Oracle]ORA-03113: end-of-file on communication channel
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed
ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).

Thanks in advanced.

Cannot find or load assembly

$
0
0

Good afternoon,

We are moving our applications to server 2012 R2 which has Oracle Client 11.2.0.4.0 installed both 32bit and 64bit. One of the requirements for these servers is only .NET 4.5 and above are to be installed.

What I have done is removed the reference to Oracle.DataAccess.dll from the project, then re-added it pointing to C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.4.0__89b483f429c47342 or C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess\v4.0_4.112.4.0__89b483f429c47342 

I then recompile and push the changes out to the server, but when trying to run get the error message Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.0'. Only way I can figure out how to get this to work is add the <runtime> section to the web config, forcing it to use newVersion="4.112.4.0"

Why if I removed the reference of the old DLL and add a new reference pointing to the correct version causes this failure?

Problems with querys in my project

$
0
0

Good afternoon guys, I have the following problem: I need to insert my vouchers into the oracle database, but first I need to find the process and the interested one by the barcode in the database: In the database I can find using this query:

--So far so good.

select * from sdpj_proc_inter where cod_bars_banestes = 'HERE INFORMATION OR NUME OF CODE OF BARS'

But the problem is that the query in my code, which is not working, follows the code.

/ Search Bar Code (codBarra = comes from the line of the file, therefore I will use to find the process and interested and insert).
                 string CodProcInter = GetCodProcInter (CodBar);

In the above code I'm calling the GetCodProcInte method r, follow the code below regarding the method:

private static string GetCodProcInter (string CodBar)
        {
            using (DB db = new DB ())
            {
                // string SQL = string.Format (@ "SELECT T0.COD_PROC_INTER FROM sdpj_proc_inter T0 WHERE T0.COD_BARS_BANESTES = {0}", CodBar);
                // string SQL = string.Format (@ "SELECT count (T0.COD_COMP_BANESTES) FROM SDPJ_COMP_BANESTES T0 WHERE T0.COD_COMP_BANESTES = '{0}'", CodBar);
              // My query is not working.
                string SQL = string.Format (@ "SELECT count (T0.COD_COMP_BANESTES) QUANTITY FROM SDPJ_COMP_BANESTES T0 WHERE T0.COD_COMP_BANESTES = '{0}'", CodBar);


                var data = db.ExecuteCommandCommission (SQL);

                if (data.Read ())
                {
                    // return data ["COD_PROC_INTER"]. ToString ();
                    return data ["QUANTITY"]. ToString ();
                }
            }

            return "";
        }

What am I doing wrong?

Blank records added while importing from excel

$
0
0

Hi

  I am importing data from excel like below . It adds few blank lines in the table which i dont want

objbulkInsert.ColumnMappings.Add(0, 1);
                objbulkInsert.ColumnMappings.Add(1, 2);
                objbulkInsert.ColumnMappings.Add(2, 3);
                objbulkInsert.ColumnMappings.Add(3, 5);


                objbulkInsert.WriteToServer(dr);

Thanks

Viewing all 1350 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>