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

Is there MySql T-Transactions to SQL Server Online Converter?

$
0
0

Is there MySql to SQL Server Online Converter?

I want to convert T-Transaction of MySQL to SQL Server:

CREATE DATABASE IF NOT EXISTS 'MyDatabase' CHARACTER SET utf8 COLLATE utf8_general_ci;


conversion failed when converting date and/or time from character string. in asp.net c#

$
0
0

When importing excel column Date in to sql Table i am getting error like this :"conversion failed when converting date and/or time from character string. in asp.net c#" 

My Code:

protected void btnUploadAll_Click(object sender, EventArgs e)
{
System.Data.DataTable dt = null;
HttpFileCollection filesColl = Request.Files;
foreach (string uploader in filesColl)
{
HttpPostedFile file = filesColl[uploader];
if (file.FileName != "")
{

string path = string.Concat(Server.MapPath("~/ImportDocument/" + file.FileName));
file.SaveAs(path);

OleDbConnection Oleconnection = new OleDbConnection("Provider=Microsoft.Ace.OLEDB.12.0;Data Source=" + path + "; Extended Properties=Excel 12.0;");
Oleconnection.Open();
dt = Oleconnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);

String[] excelSheets = new String[dt.Rows.Count];
int i = 0;

foreach (DataRow row in dt.Rows)
{
excelSheets[i] = row["TABLE_NAME"].ToString();
i++;
}

for (int j = 0; j < excelSheets.Length; j++)
{

OleDbCommand cmdd = new OleDbCommand("Select StudentId,Date1,TimeIn,TimeOut,TotalTime,FirstName,LastName,ClassNumber from [" + excelSheets[j] + "]", Oleconnection);
//OleDbCommand command = new OleDbCommand("select * from [Sheet1$]", Oleconnection);
OleDbDataAdapter OledbDA = new OleDbDataAdapter();
// Oleconnection.Close();
// Create DbDataReader to Data Worksheet
OleDbDataReader oledr = cmdd.ExecuteReader();

SqlDataReader dr = null;

// SQL Server Connection String
SqlConnection sqlConnectionString = new SqlConnection("Data Source=.;Initial Catalog= DB_Student_Report_Management; Integrated Security=True");
sqlConnectionString.Open();
string ins = "insert into Attendance2 (StudentId,Date1,TimeIn,TimeOut,TotalTime,FirstName,LastName,ClassNumber) values (@C1, @C2,@C3,@C4,@C5,@C6,@C7,@C8)";
string sel = "select * from Attendance2 where Date1=@C2 and FirstName=@C6 and LastName=@C7 and ClassNumber=@C8 ";
while (oledr.Read())
{
try
{
SqlCommand cmd = new SqlCommand(sel, sqlConnectionString);
cmd.Parameters.AddWithValue("@C2", oledr["Date1"]);
cmd.Parameters.AddWithValue("@C6", oledr["FirstName"]);
cmd.Parameters.AddWithValue("@C7", oledr["LastName"]);
cmd.Parameters.AddWithValue("@C8", oledr["ClassNumber"]);

dr = cmd.ExecuteReader();
if (dr.Read())
{
dr.Close();
continue;
}
dr.Close();
SqlCommand cmd1 = new SqlCommand(ins, sqlConnectionString);
cmd1.Parameters.AddWithValue("@C1", oledr["StudentId"]);
cmd1.Parameters.AddWithValue("@C2", oledr["Date1"]);  /// getting error like conversion failed when converting date and/or time from character string. in asp.net c#
cmd1.Parameters.AddWithValue("@C3", oledr["TimeIn"]);
cmd1.Parameters.AddWithValue("@C4", oledr["TimeOut"]);
cmd1.Parameters.AddWithValue("@C5", oledr["TotalTime"]);
cmd1.Parameters.AddWithValue("@C6", oledr["FirstName"]);
cmd1.Parameters.AddWithValue("@C7", oledr["LastName"]);
cmd1.Parameters.AddWithValue("@C8", oledr["ClassNumber"]);
dr = cmd1.ExecuteReader();
dr.Close();
}
catch (Exception ex)
{

}

}

// Bulk Copy to SQL Server
//SqlBulkCopy bulkInsert = new SqlBulkCopy(sqlConnectionString);
//bulkInsert.DestinationTableName = "Students";
//bulkInsert.WriteToServer(dr);
//Oleconnection.Close();
sqlConnectionString.Close();
Oleconnection.Close();
Array.ForEach(Directory.GetFiles((Server.MapPath("~/ImportDocument/"))), File.Delete);
Label1.ForeColor = Color.Green;
Label1.Text = "Successfully inserted";
}
}
else
{
Label1.ForeColor = Color.Red;
Label1.Text = "Please select the file.File should be only excel";
}
}
}

My Excel has following column : 

StudentIdPhotoDate1TimeInTimeOutTotalTimeFirstNameLastNameClassNumberE-mailAddress
1 14-08-209:05 AM12:15 PM3h 10mColorado Mayra4009nshruthi4)@gmail.com
2 14-08-209:02 AM9:46 PM12h 44mField Joshua4009nshruthi4)@gmail.com
3 14-08-2010:16 AM12:35 PM2h 18mHAMIDI HESSARI ZIBA4009nshruthi4)@gmail.com

Please help me to solve this problem  as soon possible :) 

Thanks in Advance :)

not getting query proper value in mysql

$
0
0

Hi all,

       I am having a query in which am getting proper value by joining two tables below is the syntax

select distinct t.user_id, first_name,last_name from tbl_user t left join tbl_req_task_map r on t.user_id=r.created_by where t.user_id not in(select created_by from tbl_req_task_map where actual_start='2014-12-31')and t.isactive=1 and superuser=0 order by first_name

but i want to join one more table in the above query and that table is "tbl_empleave_details" in the table there are three columns user_id,From_date and To_date . I want to get data as those user_id dates are not between from_date and to_date.

 

Connect to MySQL from Web Pages with MySQL ODBC 5.1 Driver

$
0
0

Hi,

I built a Web Pages (.cshtml) Razor website that uses a MySQL Database for the site content. On my development server and my own hosting companies server the site works fine. The connection to MySQL is stored in the web.config file like:

<connectionStrings><add connectionString="server=localhost;database=dbname;User Id=dbuser;password=dbpassword" name="conndb" providerName="MySql.Data.MySqlClient" />
</connectionStrings>

Now it's time to deploy the site to our clients hosting company. When I try to load any page on the site that connects to MySQL I get the following .NET error:

Unable to find the requested .Net Framework Data Provider. It may not be installed.

After a week of to-ing and fro-ing (with the host not looking at the error message) they've now told me they don't support the MySQL .Net Connector and only have the MySQL ODBC 5.1 Driver installed. I assume I can't use that driver/connector but before I go back to our client and tell him to move host I thought I'd ask anyone on here whether it is possible to use the MySQL ODBC driver with a ASP.NET Web Pages site.

If so, would I just need to change the web.config file connection string (as I'd prefer not to have change the database open/connection code on the actual pages)? - and, if so, could you let me know what the connection would look like.

I'd appreciate any help or advice.

can't connect to mysql server (localhost)

$
0
0

i am trying to create a new connection using localhost. but fails and error message prompt as below:

error code: 2003

can't connect to mysql server localhost (0)

i am using sqlyog to connect, why i can't create a new localhost connection?

Compare Three tables and fetch the vendor ID according to the Conditions

$
0
0

Table 1 (Vendor)

A

B

C

D

Table B (Assigned Vendor)

A

C

D

Table C (Vendor Payment)

A  ( Not Yet Make payment )

C   ( Payment Done )

Expected Output IS  : B and C

Explanation :

1. B is the New Vendor Items so it can ready for my termination.

2. As well C is one of the vendor but his services finished and payment done so it can ready for my termination.

3. But A is do not come because his services are not finish.

4. And D also do not come because i assigned for one process. it is not finish.

Note : Those lists are in vendor and payment done , that particular list only list out for my termination. 

Pls help me for sql query.

What is wrong in that

$
0
0
CREATE PROCEDURE 'DL05sp' (IN timval datetime,IN resis float,IN BarCode1 varchar(150),IN BarCode2 varchar(150))
BEGIN INSERT INTO dl05 (TimeValue, Resistance, BarCode_1, BarCode_2) values (timeval,resis,BarCode1,BarCode2); END



ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'END
CREATE PROCEDURE 'DL05sp' (IN timval datetime,IN resis float,IN BarCode1 var' at
 line 1

The only thing is im trying to execute in mysql command line

Please help me

Thanks

way to connect to informix?

$
0
0

Good morning,

I need to take an old application and repoint it to the new database which is informix. I can't seem to find a way to connect to it. This is what I have so far:

<DbProviderFactories><add name="IBM Informix .NET Data Provider" invariant="IBM.Data.Informix" description="IBM Informix Data Provider for .NET Framework 2.0" type="IBM.Data.Informix.IfxFactory, IBM.Data.Informix, Version=3.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/><add name="IBM Informix .NET Data Provider 3.0.0" invariant="IBM.Data.Informix.3.0.0" description="IBM Informix Data Provider 3.0.0 for .NET Framework 2.0" type="IBM.Data.Informix.IfxFactory, IBM.Data.Informix.3.0.0, Version=3.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/></DbProviderFactories>

Its an ODBC connection but I couldn't find a way to do that so I did this:

<add connectionString="Database=db_cra;Host=xx.x.x.xxx;Server=xxxxx_01_uccx;Service=1504; 
             Protocol=onsoctcp;UID=uccxwallboard;Password=xxxxxx;Persist Security Info=true; 
             Authentication=Server" name="Queues" providerName="IBM.Data.Informix" />

It seems to work then I try to run a query and it says:

Exception Details: System.ArgumentException: Invalid argument

var selectCommand =  db.Query(@"SELECT CSQName,ConvOldestContact,
        AvailableAgents,UnavailableAgents,CallsWaiting,WorkingAgents,TalkingAgents
        FROM dbo.RTCSQsSummary where CSQName not in ('MIStestQueue','CSQ') order by CSQName");

Any ideas would be great.

Thanks!


Get OleDb reading from excel to skip all empty rows.

$
0
0

I have been wracking my brain trying to figure out how to get OleDB to not import empty rows in my importable excel files.  It starts and will run perfectly fine until it hits an empty row and then it craps out.  Is there some way of doing this where if the row it is encountering it goes to the next row?  I am using a foreach loop.  The loop code looks like this:

                {
                    File.Copy(ExcelTempl, ExcelFile);
                    DirectoryInfo di = new DirectoryInfo(DropZone);
                    FileInfo[] fi = di.GetFiles("Master_*.xl*");
                    // step through each found file 
                    foreach (FileInfo fiTemp in fi)
                    {
                        {
                            // Connection String to Excel Workbooks
                            System.Threading.Thread.Sleep(1000);
                            string excelConnStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='" + DropZone + "\\" + fiTemp + "'; Extended Properties=\"Excel 8.0; HDR=YES; IMEX=1;\"";
                            WriteEvent("File Read", "Reading excel file " + fiTemp + " now.", "Automation User");
                            using (OleDbConnection connection = new OleDbConnection(excelConnStr))
                            {
                                connection.Open();
                                DataTable dt = connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
                                if (dt != null)
                                {
                                    string[] excelSheets = new String[dt.Rows.Count];
                                    int i = 0;
                                    foreach (DataRow row in dt.Rows)
                                    { // I believe I need to do something right here

Any suggestions would be appreciated!

convert db2 to sql server

$
0
0

can nay one help me how to convert following db2 query to sql server

select AO_CARDHDR_NO||' '||AO_MERCHANT_ID||'  '||AO_REQUEST_DATE||'  '||AO_BILLING_AMT||'  '||AO_APPROVAL_CD,

count(AO_CARDHDR_NO||' '||AO_MERCHANT_ID||'  '||AO_REQUEST_DATE||'  '||AO_BILLING_AMT||'  '||AO_APPROVAL_CD)

from cp_aponus

where

AO_RESPONSE_CD='00'

and (integer(months_between(to_date(current date,'YYYYMMDD'),to_date(AO_REQUEST_DATE,'YYYYMMDD'))*30) >=1

and integer(months_between(to_date(current date,'YYYYMMDD'),to_date(AO_REQUEST_DATE,'YYYYMMDD'))*30)<=90)

group by AO_CARDHDR_NO||' '||AO_MERCHANT_ID||'  '||AO_REQUEST_DATE||'  '||AO_BILLING_AMT||'  '||AO_APPROVAL_CD

having count(AO_CARDHDR_NO||' '||AO_MERCHANT_ID||'  '||AO_REQUEST_DATE||'  '||AO_BILLING_AMT||'  '||AO_APPROVAL_CD) >1 

 

try connect to MySQL

$
0
0

what is the mistake i did when try connect to MySQL server. Thank for help

<add name="conString" connectionString="Data Source=localhost;Initial Catalog=db_insurance;Integrated Security=True;" providerName="MySql.Data.MySqlClient" />
 protected void btnSave_Click(object sender, EventArgs e)
        {
            using (MySqlConnection conDS = new MySqlConnection(ConfigurationManager.ConnectionStrings["conString"].ToString()))
            {
                conDS.Open();
                MySqlCommand cmdSelect = new MySqlCommand("Select custId From customer", conDS);
                MySqlDataReader dtrUser = cmdSelect.ExecuteReader();
                if (dtrUser.Read())
                {
                    txtName.Text = dtrUser[0].ToString();
                }

                dtrUser.Close();
                conDS.Close();
            }
        }

error display 

Exception Details: System.ArgumentException: Keyword not supported.
Parameter name: integrated security
highlight  using (MySqlConnection conDS = new MySqlConnection(ConfigurationManager.ConnectionStrings["conString"].ToString()))

mySQL auto increment

$
0
0

how to insert data manually into database , auto-increment added automatically 

the way i did is wrong? for the CustID i already set to auto increment, supposedly database will auto detect the id?

Not able to connect to Oracle database from Visual Studio 2012, giving error.

$
0
0

I am trying to connect to Oracle database from Visual Studio 2012 but I am getting the error as "attempt to load oracle client libraries threw badimageformatexception this problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed"

The software configuration on my machine is 
Visual Studio 2012 Professional 64 bit
Oracle SQL Developer 32 bit.

Even though, I changed the target platform from "Any CPU" to "x86" while debugging the code.

Any suggestions on this?

Am getting this error in orcle 11g ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'POPULATE_GENERAL_BOND_DATA' ORA-06550: line 1, column 7: PL/SQL: Statement ignored

$
0
0

Here   p_ebond_id is output parameter and its datatype is number below code am using but getting error.Please tell where am going wrong. 

             OracleParameter pebondidout = new OracleParameter();
                pebondidout.ParameterName = "p_ebond_id";
                pebondidout.Direction = ParameterDirection.Output;
                pebondidout.Size = 1;
                pebondidout.ArrayBindSize = new int[1] { 100 };
                pebondidout.OracleDbTypeEx = OracleDbType.Varchar2;
                pebondidout.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
                Orcmd1.Parameters.Add(pebondidout);
                
                Orcmd1.Connection = Oracon;
                Oracon.Open();
                int k = Orcmd1.ExecuteNonQuery();

                Resultset = (string[])Orcmd1.Parameters["p_ebond_id"].Value;

Thanks in Advance

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2

$
0
0

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in windows server 2008 r2.I made a application in asp.net c#.I am using ODBC connection.When I deployed my application in windows server2008 r2.There is no Microsoft ODBC driver shown in ODBC Data source administrator.Then I go to the C:\Windows\SysWOW64 and open  Odbcad32.exe and add Microsoft ODBC2 driver for Oracle and when I run my application I got following error
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I am using follwoing string

 <connectionStrings>

<add name="theconnetion" connectionString="DSN=abdb;UID=abc;PWD=xyz"/>

 </connectionStrings>

Guide me What I do?


fetching data from datareader

$
0
0

Hello,

Can anyone please tell me how to fetch 5000 records using Oracledatareader.

we tried with following code.but nothing is returning.

oraclecommand cmd=new oraclecommand("query" ,con)

oracledatareader dr=cmd.executereader();

while(dr.read()) //not enetering here

{

}

Entity Framework Exception: Schema specified is not valid. for oracle

$
0
0

I working in Asp.net with entity framework in vs 2010 with oracle database. I provide connection string from code for entity frame work datacontext. Here is my code:

public static string getConStrSQL()
    {

        //string connectionString = new System.Data.EntityClient.EntityConnectionStringBuilder
        string connectionString = new System.Data.EntityClient.EntityConnectionStringBuilder
        {
            Metadata = "res://*",
            Provider = "Oracle.ManagedDataAccess.Client",
            //Provider = "Oracle.DataAccess.Client",
            ProviderConnectionString = new System.Data.SqlClient.SqlConnectionStringBuilder
            {
                //InitialCatalog = "ORCL",
                DataSource = "MONOJ-PC:1521/ORCL",
                //IntegratedSecurity = false,
                UserID = "C##MONOJ",                 // User ID such as "sa"
                Password = "Thanks123",               // hide the password
            }.ConnectionString
        }.ConnectionString;

        return connectionString;
    }

    public List<CUSTOMER> GetCustomerList()
    {

        using (Entities db = new Entities())
        {
            db.Connection.ConnectionString = getConStrSQL();
            db.Connection.Open();

            var data = from p in db.CUSTOMERs
                       select p;

            db.Connection.Close();

            return data.ToList();
        }
    }

But when i run the Code i get Following errors:

Schema specified is not valid. Errors: error 0194: All artifacts loaded into an ItemCollection must have the same version. Multiple versions were encountered. DAL.DBModel.ssdl(2,46) : error 0172: All SSDL artifacts must target the same provider. The Provider 'Oracle.DataAccess.Client' is different from 'Oracle.DataAccess.Client' that was encountered earlier. DAL.DBModel.ssdl(2,89) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken '12.1' is different from '9.2' that was encountered earlier. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(3,4) : error 0019: The EntityContainer name must be unique. An EntityContainer with the name 'Schema' is already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(834,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.Table' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(844,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.TableColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(870,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.View' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(882,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ViewColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(908,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.Function' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(933,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.Procedure' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(943,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.Parameter' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(967,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.Constraint' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(979,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.CheckConstraint' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(987,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ConstraintColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(996,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ForeignKeyConstraint' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1005,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ForeignKey' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1016,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ViewConstraint' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1031,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.TableTableConstraint' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1044,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ConstraintConstraintColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1057,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ConstraintForeignKey' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1070,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.FromForeignKeyColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1083,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ToForeignKeyColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1096,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.TableTableColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1109,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ViewViewColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1122,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.FunctionFunctionParameter' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1135,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ProcedureProcedureParameter' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1148,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ViewViewConstraint' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1161,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ViewConstraintConstraintColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1174,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ViewConstraintForeignKey' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1187,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.FromForeignKeyViewColumn' was already defined. Oracle.ManagedDataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(1200,4) : error 0019: Each type name in a schema must be unique. Type name 'Oracle.ToForeignKeyViewColumn' was already defined.

I googled but can not get any answer. Please, Help me. It's argent.

Bye-

With regards

Sadequzzaman Monoj

Bangladesh

check if value exist into database (best way)

$
0
0

how to prevent duplicate CustName insert into database, can i use Linq method to filter but do not has data table? has any best way to do ?

 protected void btnSave_Click(object sender, EventArgs e)
        {
            using (MySqlConnection connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["conString"].ToString()))
            {
                try
                {
                    connection.Open();

                    MySqlCommand cmdInsert = new MySqlCommand("Insert Into Customer(CustName,CustPhone,CustEmail,CustAddress) VALUES (@CustName, @CustPhone, @CustEmail, @CustAddress)", connection);

                    cmdInsert.Parameters.AddWithValue("@CustName", txtName.Text);
                    cmdInsert.Parameters.AddWithValue("@CustPhone", txtPhoneNo.Text);
                    cmdInsert.Parameters.AddWithValue("@CustEmail", txtEmail.Text);
                    cmdInsert.Parameters.AddWithValue("@CustAddress", txtAddress.Text);
                    int check = cmdInsert.ExecuteNonQuery();
                    if (check > 0)
                        Clear();
                    else
                        ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Connection Fail", "alert('Fail to Insert !!! Please Try Again')", true);
                }
                catch (MySqlException)
                {
                    throw;
                }
                finally
                { 
                    connection.Close();
                }
            }
        }

need help in left outer join for output

$
0
0

dear all,

             I am stuck in left outer join in ORACLE. Below are my two tables and expected output.

table1 is as below

F_CODEF_TYPEF_NAME
500(null)PAYROLL
501FIT.aspx
502FMIS.aspx
503FFUV.aspx
504FPaySlip.aspx
505FDataExcel.aspx
600(null)LOAN
601FLOAN_A.aspx
602FLOAN_INW.aspx
603FLOAN_APPR.aspx
604FVEHL_LOAN.aspx
605FfrmPF.aspx
700(null)REPORTS.aspx
800(null)UTILITY
801FM_USER.aspx
802FCHANGE_PASSWORD.aspx
803FROLL_RIT.aspx

table 2 is as below

R_CODEF_CODER_ADDR_EDIT
R004500YY
R004502YN
R004504YN
R004600YY
R004601NN

and my expected output should be like

R_CODEF_CODER_ADDR_EDIT
R004500YY
R004501YN
R004502YN
R004503YY
R004504NN
R004505nullnull
R004600nullnull
R004601nullnull
R004602nullnull
R004603nullnull
R004604nullnull
R004605nullnull
R004700nullnull
R004800nullnull
R004801nullnull
R004802nullnull
R004803nullnull

how can i do this in oracle . Table 1 is master table.

Oracle.DataAccess.Client.OracleException

$
0
0

IM Running into the below issue when I open a particular tab in a MVC webapplication which is using Oracle as a backend. I tried to remove the old reference of Oracle.DataAccess and added a new reference but, no luck. Please pen down your suggestions

Exception Details: Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client

Viewing all 1350 articles
Browse latest View live


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