Develop and administer Oracle databases and apps. Learn SQL and PL/SQL, indexing, performance tuning, partitions, RAC, backups, Data Guard, security, and APEX. Get deployment tips and automation scripts for stable, compliant environments.
384 posts203 contributors
Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Both DataSource and DataSourceID are defined on 'GridView1'. Remove one definition. Source Error: Line 26: Line 27: GridView1.DataSource = dt; Line 28: GridView1.DataBind(); Line 29: } Line 30: } Source File: c:\Users\Ujwal S shetty\OneDrive\Mobile =doc,pic,videos\Desktop\Mini Project\studentmanagement\studentmanagement\ManageStudent.aspx.cs Line: 28 Stack Trace: using System; using System.Data; using System.Data.OleDb; using System.Configuration; public partial class Pages_ManageStudent : System.Web.UI.Page { string connStr = ConfigurationManager.ConnectionStrings["AccessConn"].ConnectionString; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindGrid(); } } void BindGrid() { using (OleDbConnection conn = new OleDbConnection(connStr)) { string sql = "SELECT * FROM Students"; OleDbDataAdapter da = new OleDbDataAdapter(s
Hello, I am using oracle database. I have one table with column END_DATE as varchar datatype. The data in the column is like 02/01/2025 in DD/MM/YYYY date format. I am using between date query, but it says - Not a valid month Please suggest any valid date format so i can convert those dates in valid format. I have tried to_char(), to_date and trunc() My query : select * from table where END_DATE between to_date('01/12/2024', 'DD/MM/YYYY.') and to_date('10/02/2025', 'DD/MM/YYYY.') OR How can I write query to get last 3 month data from table according to current date. For Ex: BETWEEN SYSDATE-90 and SYSDATE Thanks in adv !
I am trying to create .net core api with dapper using oracle connection.In existing project that project on sql i need to change almost all db side logic.how can i start
Hi, My data is like this formate.-Using Query SELECT DISTINCT W.CONTRACTNUM, W.STARTDATE,W.POSITIONDESC, W.RATE801 FROM BI_HZ_ETL.LEM_CNRLEMCRAFTRATE W WHERE W.CONTRACTNUM='A689' GROUP BY W.CONTRACTNUM,W.POSITIONDESC,W.STARTDATE,W.RATE801 ORDER BY W.CONTRACTNUM,W.POSITIONDESC,W.STARTDATE CONTRACTNUM POSITIONDESC RATE801 STARTDATE A689 ACC+PR 71.88 2/6/2022 A689 ACC+PR 72.77 1/1/2023 A689 ACC+PR 73 1/1/2024 A689 ADM+L1 45.07 2/6/2022 A689 ADM+L1 47.86 1/1/2023 A689 ADM+L1 48.01 1/1/2024 A689 ADM+TK 53.11 2/6/2022 A689 ADM+TK 56.41 1/1/2023 A689 ADM+TK 56.58 1/1/2024 A689 CO+HSE/DSP 93.15 1/1/2023 A689 CO+HSE/DSP 93.15 1/1/2024 A689 CO+MAT 67.35 2/6/2022 A689 CO+MAT 72.23 1/1/2023 A689 CO+MAT 72.46 1/1/2024 A689 CO+PR 71.88 2/6/2022 A689 CO+PR 76.37 1/1/2023 A689 CO+PR 76.61
We are using LDAP to find the list of active users. From DB we are connecting to LDAP. The DB Servers are on Linux Azure Cloud. From DB Servers to LDAP Servers we raised a Azure Firewall request for both port 636(Encrypted Port) and 389(Non Encrypted Port). Firewall rules are in place and connectivity is working. Now from DB able to connect to LDAP over port 389 but not able to connect to LDAP over port 636. For port 636 it gives following error DBMS_LDAP Still Fails: ORA-31202: DBMS_LDAP: LDAP client/server error: SSL handshake failed What needs to be done for this,please can someone suggest?
I have two tables one is students_Games and one is students tables both have a student_id a primary foriegn key relationship now based on their games I am putting them in some queue Student table {Student_id,name,Address} Students_games(id,Student_ID(FOREIGNKEY,game_code), table_ID student_id game Code 1 1 200 2 2 200 3 2 300 4 3 200 5 3 300 6 4 870 My Qyuery is like this Select * from studnets ss join students_games gg on gg.Student_id=ss.student_Id where gg.Games_code in (200,300) Now when i run this for student id 2 and 3 it will return two,two rows one for 200 and one for 300 , now I want to set the prioirty like if there is 200 available then it must return 200, if not then it should return 300 if both of them not present then it should return 0 . how to query it like that i mean if 200 game code is available then chose it for every student and don't chose 300 for it if 200 is available if 200 is not available then chose 300 as game code if both of them not there then chose 0
Database name is TEST, user name test, pass test1234 I create fake acocunt, conection to db work Data are located ond next loaction: When connected do db OTHER USERS/MASTER/Table1 How to read that data to datarid? I try this cod and have error: NETWORK LIBRARY: Name-Value syntax error Error number: ORA-00303 private void TABLE_fill() { String connectionString = "Data Source=(" + " TEST = " + " (DESCRIPTION = " + " (ADDRESS = (PROTOCOL = TCP)(HOST = test.localdomain.intra)(PORT = 1521)) " + " (CONNECT_DATA = " + " (SERVICE_NAME = TEST) " + " (INSTANCE_NAME = TEST) " + " ) " + " ) " + " User Id=test; password=test1234; "; OracleConnection con = new OracleConnection(); con.ConnectionString = connectionString; con.Open(); OracleCommand cmd= new OracleCommand(); cmd.CommandText = "select * from Table1"; cmd.Connection= con; cmd.CommandType = CommandType.Text; //cmd.ExecuteNonQuery(); OracleDataReader dr = cmd.ExecuteReader(); dr.Read(); System.Data.DataTable dataTable = new System.Data.DataTable(); dataTable.Load(dr); ListDataGridView.DataSource = dataTable; ListDataGridView.Update(); ListDataGridView.Refresh(); }
Account Description Beginning Balance Debits Credits <td colspan="2" style="background-color:#dfeaf3; border-bottom:none
Can I install Oracle 23c (free) in a server with CentOS and use it for learning and training. Also no license cost or any other cost .. Please advise.
Hi, Error - ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1 in I have declared SP Parameter. P_user_id varchar2 DEFAULT '', P_USER_PASSWORD varchar2 DEFAULT '', P_OUT_USER_ID OUT NUMBER , P_OUT_MSG_ID OUT NUMBER Regards, Pratik
PROCEDURE InsertCustomerEvaluation( cef_cust_id IN VARCHAR, cef_ce_id out number)AS cef_c_e_id NUMBER; BEGIN BEGIN SELECT CEF_CUSTOMER_EVA_SEQ.NEXTVAL INTO cef_c_e_id FROM dual; cef_ce_id:=cef_c_e_id; INSERT INTO CEF_CUSTOMER_EVALUATION ( C_E_ID, CUST_ID, E_R_ID, SCORE, FILLED_DATE ) VALUES ( cef_ce_id, cef_cust_id, 1, '', sysdate ); END; END InsertCustomerEvaluation; Below is my code in back end. public int InsertCustomerEvaluation(string CUST_ID) { OracleParameter C_E_ID = new OracleParameter("C_E_ID", OracleDbType.Decimal); C_E_ID.Direction = ParameterDirection.Output; try { ce_id = _context.Database.ExecuteSqlRaw ("DECLARE C_E_ID NUMBER; BEGIN CEF_APP.InsertCustomerEvaluation(:CUST_ID,:C_E_ID);:C_E_ID:=C_E_ID; END;", new OracleParameter("CUST_ID", CUST_ID), C_E_ID); } &nb
Error in Accessing DBMS_Crypto package Encrypt and Decrypt Function Getting Error "PLS-00201: identifier 'SYS.DBMS_CRYPTO' must be declared" select sys. DBMS_CRYPTO.encrypt (UTL_RAW.CAST_TO_RAW ('ABCDEFGH12345'), 4356 /* = dbms_crypto.DES_CBC_PKCS5 */ , 'A1A2A3A4A5A6CAFE') from dual;
I am trying to connect to oracle sql developer through .net application but getting this error ORA-12154: TNS:could not resolve the connect identifier specified Please let me know how can this issue be resolved
Hello, I want to get records between date range, using Oracle-PL/Sql. Following is the query: Select * From [Table_Name] where (to_date(P_End_Date, 'DD/MM/YYYY') between to_date(FromDate, 'DD/MM/YYYY') and to_date(ToDate, 'DD/MM/YYYY')); P_End_Date, FromDate and ToDate are of Varchar datatype I am getting error in query as ORA - 01843:Not a valid month P_End_Date column has Hypen(-) or Slash(/) in some records in my table, will it affect error in query ? Thank you
I have no problem connectiong to ORACLE using the classic default authentication user/password. In such a case, I use a connection string like string conn = "User Id=mike;Password=\"mike\";Data Source=localhost:1521/oraservice;Pooling = false;Connection Timeout=60;"; I attempted to find information about how to connect via Kerberos, without luck. Somewhere I saw that there may be another parameter in the string, called Integrated Security = yes. However, when I try to use it, I get the message that it is an invalid parameter. I am also sure I have to somehow pass the paths to these two Kerberos file Configuration File: krb5.conf Cache File: KRB5cc_<userid> Anybody had experience with Oracle/Kerberos access in C#?
I would like to ask a simple question I have oracle database in which I have Training Database Now when I am using ASP.NET ENTITY data model from database and giving my connection detail I am able to see all tables in the Training database, Now I require 3-4 more tables which the DBA created under DATABASE-->OTHER USERS-->TESTUSER so I am using same connection information for my entity data model I am able to see the tables of training but not able to see the tables which the DBA created under other users-->testuser any idea/?
hi dear all... how can i using scanner device in form oracle builder 10g or any javaclass .jar that i could to embeded within my project in oracle form 10g
I have a table in which I have Users ( userId,User_National_number,Date_Of_registratration) I have another excel sheet in which I have (user_social_number) I want to add two more columns in my excel with one columne as boolean yes/no and one as date , I would like to update the excel sheet I want to show Yes in front of user_social_number in my excel sheet if that user is available in my table along with its date of registration , How can I query that ,
Does anyone have any experience with the following error? Thanks, Will Server Error in '/RSWeb' Application. Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. ] System.Data.OracleClient.OracleConnectionPoolManager.GetPooledConnection(String encryptedConnectionString, OracleConnectionString options, OracleConnection owningObject, Boolean& isInTransaction) +202 System.Data.OracleClient.OracleConnection.OpenInternal(OracleConnectionString parsedConnectionString, Object transact) +600 System.Data.OracleClient.OracleConnection.Open() +32 AMAT.DataAccess.Utilities.DAMapHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, OracleParameter[] commandParameters) +54 AMAT.DataAccess.MasterDB.Master.GetSingleDRValue(String
I am using entity framwork and while saving record to my table I am getting below error message what would be the cause "The changes to the database were committed successfully, but an error occurred while updating the object context. The ObjectContext might be in an inconsistent state. Inner exception message: Saving or accepting changes failed because more than one entity of type 'APP_Application.Models.Employee_Log' have the same primary key value. Ensure that explicitly set primary key values are unique. Ensure that database-generated primary keys are configured correctly in the database and in the Entity Framework model. Use the Entity Designer for Database First/Model First configuration. Use the 'HasDatabaseGeneratedOption" fluent API or 'DatabaseGeneratedAttribute' for Code First configuration" I am saving data in another table not in Employee_log but there is a trigger which fire when I do insertion on other table I check the employee_log table it is having unique primary key
I have a one table in which i am storing customer and their installment amount , there are total 4 installment for each customer ,few customer missed few installment like customer ABC has installment 1 , but then he missed installment # 02 , then he get installment # 03 etc Installment # Installment Amount Customer Name 1 100 ABC 2 100 ABC 3 100 ABC 4 100 ABC 1 100 XYS 3 100 XYS 4 100 XYS 1 100 GGG As from above table you can see there are three customer , customer ABC get all installment ,customer XYS missed installment # 02 and Customer GGG get only one installment . Now I want to get the count of all customer who get 1-At least three installment 2-in this query I want to get all those customers who get three consecutive installment like 1,2,3 How to write these two queries in oracle , my table name is customer_installment
select distinct 'carTypes' as type, mi.WOMENNAME as "mother name", mi.womencnic as "mother CNIC", '' as BFORMNO, '' as child_gender, mi.PROVINCE, mi.district, mi.tehsil, mi.HUSBANDNAME, mi.PHONENO contact, mi.address, SUM(p.amount) paid_amount from MINFORMATION mi inner join PAYMENTINFORMATION p on p.BENEFICIARYID=mi.WOMENID and p.BANKSTATUS='Successfull' where mi.month IS NOT NULL and p.generationdate between '24-JUN-21' and '01-JAN-22' group by mi.WOMENNAME, mi.womencnic,mi.PROVINCE, mi.district, mi.tehsil, mi.HUSBANDNAME, mi.PHONENO , mi.address this is my query I need generationDate in select list as well which is coming from PAYMENTINFORMATION tableso after adding it in select list it ask me to add it in group by as well by doing so I am getting extra row my actual rows are 1629 but after adding generationDate in select and order by I am getting 1944 Rows how to solve it its oracle query
I have a simple asp.net web form application when i am opening the connection I am getting this error 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. below is my code. protected void Page_Load(object sender, EventArgs e) { string conStr = ConfigurationManager.ConnectionStrings["myconestring"].ToString(); OracleConnection con = null; OracleCommand cmd = null; OracleDataReader rd = null; string val = null; try { using (con = new OracleConnection(conStr)) { cmd = new OracleCommand(); cmd.CommandText = "select count(*) from child"; cmd.Connection = con; con.Open(); rd = cmd.ExecuteReader(); rd.Read(); val = rd.GetInt16(0).ToString(); } } catch (Exception err) { Response.Write(err.Message); } finally { con.Close(); con.Dispose(); cmd.Dispose(); } Response.Write(val); } }
Hi I have a query like below and my Distribution columns in database is having number from 1-100 , as well as null some people type 90 some type 090 when performing the action it gives this below error An error was encountered performing the requested operation ORA-01722 INVALID NUMBER 01722 00000 INvalid Number Cause : The specified number was invalid Action : specify a valid number vendor code 1722 HERE IS MY QUERY SELECT NVL(SUM(NVL(mt.Distributed,0)),0) DISTRIBUTED_AMOUNT from TBL_DISTRIBUTION mq,Client information mt where mq.id=mt.id
Hi, is there is any way to know if a table is manually updated (i.e, somebody updating a table using Oracle SQL Developer tool and he has access to update that table). how can i audit log this table in Oracle and SQL Server.