Dynamic fields with custom data type


I will try to make this simple. I am using an EBS API and it has a datatype called EGO_ITEM_PUB.ITEM_TBL_TYPE

It is essentially an object which has all of the fields for it's base table (which is MTL_SYSTEM_ITEMS_B).

When using the API, I do something like this...

l_item_table EGO_ITEM_PUB.ITEM_TBL_TYPE;

BEGIN

l_item_table(1).DESCRIPTION := 'TEST';

The above snippet works fine, however my question is this...

Can I somehow dynamically determine the property

For example...I know the following won't work but I am essentially trying to do something like this (sorry I am not asking my question more clear...it is difficult to phrase it):

l_item_table EGO_ITEM_PUB.ITEM_TBL_TYPE;
v_field_name VARCAHR2(100);

BEGIN

v_field_name := 'DESCRIPTION';

l_item_table(1).v_field_name := 'TEST';

Any ideas
Posted On: Monday 31st of December 2012 01:51:52 AM Total Views:  270
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




Replication. How do this?

I have three databases. Database A in one plans in the city of Belo Horizonte Database B in one plans in So Paulo's city Database C in one plans in the city of Rio de Janeiro As master database has the A, and in him, I have the white schema that has 4 tables that are called of PIPOCA, TAPIOCA, JUREMA, JUPIRA all they have the column city in common. I have to answer through snapshot the tables for the database B, C with interval of 30 seconds. And for the database that this in So Paulo's city should only go the data of the tables that owned to that city. The same happening for the City Rio de Janeiro. 1) Do I have to create a schema in you plan them B, identical C to the of the it plans A\t 2) do I create the snap in the banks B,C or in the A\t 3) it would not be better to create a dblink of the database B,C and later to create Views for the database passing IT @dbklink with the clause where city = ' So Paulo' and tb where city = ' Rio of Janeiro'\t 4) it is only enough to create the snapshot in it plans it ABC with the dblink configured correctly that the load is made surely\t 5) does anybody have some example script so that I can looks at\t\t Tanks
VIEWS ON THIS POST

44

Posted on:

Wednesday 7th November 2012
View Replies!

TNS error on Login

Hi Everyone, I've just installed the Oracle 9.2.0.6 binaries on Solaris, the environment for ORA... , LD_... , TNS_... are set correctly, and I want to create an instance locally on the server. The SID is set and I try to connect with: sqlplus "/as sysdba" but I get: __________________________________________________ $ sqlplus "/as sysdba" SQL*Plus: Release 9.2.0.6.0 - Production on Wed Nov 16 15:08:03 2005 Copyright (c) 1982, 2002, Oracle Corporation. rights reserved. ERROR: ORA-12545: Connect failed because target host or object does not exist Enter user-name: ___________________________________________________ Does anyone know what's going on I've not come across this before.
VIEWS ON THIS POST

49

Posted on:

Wednesday 7th November 2012
View Replies!

remove Advance Replication

Hi , I am running 3 way advance replication on HPUX 11i(test machine) and Oracle 9.2.0.3 How can I remove the replication from all of the systems without effecting the users( means without downtime). I dont want to run catrepr. steps would be more helpful.
VIEWS ON THIS POST

143

Posted on:

Wednesday 7th November 2012
View Replies!

PL/SQL Quesiton1

Evaluate this PL/SQL loop: WHILE v_price < &&p_count LOOP v_amount := v_amount + 1; v_price := v_amount * &&p_pct_increase; END LOOP; If V_PRICE is 45, P_COUNT is 75, and V_AMOUNT is 5, which P_PCT_INCREASE value would cause the loop to terminate
VIEWS ON THIS POST

55

Posted on:

Wednesday 7th November 2012
View Replies!

Outer join in Oracle

When I tried to run following SQL statement, I got rror. SELECT COUNT (*) FROM A LEFT OUTER JOIN B ON A.ID = B.ID ERROR at line 2: ORA-00933: SQL command not properly ended But this one is fine: SELECT COUNT (*) FROM A, B ON A.ID = B.ID(+) Can Anyone tell me what's wrong
VIEWS ON THIS POST

91

Posted on:

Wednesday 7th November 2012
View Replies!

Query execution time vary time to time

gurus, i have a query with "union" and over the time the execution time is changing. somethimes the execution time vary with more than 2 minutes. It happends randomly w/o any pattern. No statistics are being analyzed between the slow down occurances, moreover the query does not use any bind variables. my execution plan is: SELECT STATEMENT Cost = 6108 SORT UNIQUE UNION-ALL TABLE ACCESS FULL NESTED LOOPS TABLE ACCESS FULL TABLE ACCESS BY INDEX ROWID INDEX UNIQUE SCAN I have checked the sort_area_size and sort_area_retained_size, sorts memory/disk ratio, library cache hit ratio, and they all looks ok. anyone has any idea what might causing this to happend
VIEWS ON THIS POST

76

Posted on:

Wednesday 7th November 2012
View Replies!

Oracle10g R2 + ASM + SGeRAC

We want to Install Oracle 10g R2 RAC using ASM on HP-UX PA RISC(64bit) servers. I have gone through many documents but got confused about SGeRAC (ServiceGuard Extension for RAC). Also, HP says that it supports ASM with SGeRAC from Version A.11.17 and with HP-UX 11i V2 and Update2. Where as Oracle says you don't require SGeRAC and LVMs using SLVM etc. as ASM provides LVM features itself. I would like to know whether we can use SGeRAC and SLVM with ASM or not regards, Dileep Tallam.
VIEWS ON THIS POST

51

Posted on:

Wednesday 7th November 2012
View Replies!

Problem with db link usage

I have a PL/SQL code which will try to list a set of tables from the remote database & try displaying. When I ran the code, I am getting the error declare cursor table_list_c is (select table_owner||'.'||table_name tab_name from scr_process@scr_link MINUS select owner||'.'||table_name tab_name from dba_tables@scr_link ); table_name_v scr_process.table_name@scr_link%type; begin for table_name_v in table_list_c loop dbms_output.put_line(table_name_v.tab_name); end loop; end; declare * ERROR at line 1: ORA-04052: error occurred when looking up remote object SYS.X$KSPPI@SCR_LINK.US.ORACLE.COM ORA-00604: error occurred at recursive SQL level 1 ORA-02068: following severe error from SCR_LINK ORA-03113: end-of-file on communication channel DB link(scr_link) is working properly & even the inner sql query when I run separately, it is working fine. Please suggest what is going wrong here What can I do to make it to work
VIEWS ON THIS POST

64

Posted on:

Wednesday 7th November 2012
View Replies!

sqlloader using a csv file

Hi Friends, I have a csv/text file with column ID, NAME, SAL with sample data: "0001","SCOTT WILSON","3000" "0002","JOHN MAC","4000" I created a table NAME with single column (name varchar(30)) only. I want to load the second column of my input txt data. How can i create a .ctl for this pls
VIEWS ON THIS POST

93

Posted on:

Wednesday 7th November 2012
View Replies!

Partitioning Doubt ???

Row-wise partitioning is possible. However, what about column-wise partioning. Is this possibe
VIEWS ON THIS POST

69

Posted on:

Wednesday 7th November 2012
View Replies!

RMAN - Changed the node on the server

I've changed the node name of the server that has the RMAN catalog installed - do I need to tell RMAN that the node has chnaged cos i'm getting lots of errors:- SBT-21806 () 09/10/02 12:22:34 [Critical] From: BDA-NET@ccsun1 "CCLIVE" Time: 09/10/02 12:22:34 Cannot connect to Media Agent on system ccreco, port 51630 (IPC Invalid Hostname or IP Address System error: HOST_NOT_FOUND ) => aborting.
VIEWS ON THIS POST

66

Posted on:

Wednesday 7th November 2012
View Replies!

Restoring database question

Hi This is very urgent question. I have restored all datafiles from backup then start database in nomount and create controlfiles. Now i am doing recover database using backup controlfile until cancel command and it is asking me for new archived file. I commented out these three parameters before starting instance #*.log_archive_dest='/c2/oradata8/peru/arch' #*.log_archive_format='peru_thr%t_%s.arc' #*.log_archive_start=TRUE but because of this (i think) i am unable to use AUTO option in applying archived redo logs (1.because it does not know the path where archived files are 2. it does not know that format of file name). Now my question is can i cancel recovery and shutdown instance then uncomment these three parameters then start database in nomount and continue recovery using auto option. Will this work as i have to apply 2000+ archived log files due to size of database I will appreciate if someone had experience in doing this.
VIEWS ON THIS POST

116

Posted on:

Wednesday 7th November 2012
View Replies!

Questions ?????

, My friend asked me the following questions to me , for which i do not have answers, so i thought I can get them from this forum,,, here are they 1)Is there any limit on the number of tables created in an Oracle Database 2)Is there any limit on the number of columns a table is created in an Oracle Database 3)Is there any limit to the size of the Oracle database created 4)Is there a limit for number of concurrent users connecting to Oracle database
VIEWS ON THIS POST

34

Posted on:

Wednesday 7th November 2012
View Replies!

Problem with Application Server

! I generated Web Form in Designer 2000 and when I intalled it, Appication Server returned following error: Package body country$b_country... Warning: Package Body created with compilation errors. Errors for PACKAGE BODY COUNTRY$B_COUNTRY: LINE/COL ERROR -------- ----------------------------------------------------------------- 80/15 PLS-00201: identifier 'CG$B_COUNTRY.CG$ROW_TYPE' must be declared 80/15 PL/SQL: Item ignored 81/15 PLS-00201: identifier 'CG$B_COUNTRY.CG$IND_TYPE' must be declared 81/15 PL/SQL: Item ignored 82/15 PLS-00201: identifier 'CG$B_COUNTRY.CG$PK_TYPE' must be declared 82/15 PL/SQL: Item ignored 83/15 PLS-00201: identifier 'CG$B_COUNTRY.CG$ROW_TYPE' must be declared 83/15 PL/SQL: Item ignored 84/15 PLS-00201: identifier 'CG$B_COUNTRY.CG$IND_TYPE' must be declared 84/15 PL/SQL: Item ignored 129/10 PLS-00320: the declaration of the type of this expression is incomplete or malformed 129/10 PL/SQL: Statement ignored 130/10 PLS-00320: the declaration of the type of this expression is incomplete or malformed 130/10 PL/SQL: Statement ignored 133/13 PLS-00201: identifier 'CG$ERRORS.PUSH' must be declared 133/13 PL/SQL: Statement ignored 139/10 PLS-00320: the declaration of the type of this expression is LINE/COL ERROR -------- ----------------------------------------------------------------- incomplete or malformed Please help me solve this problem.
VIEWS ON THIS POST

42

Posted on:

Wednesday 7th November 2012
View Replies!

Portal Installation ?

Hi all. I have a few questions about Installing Application Server & Oracle Portal. I h've prepared a computer with these configurations & softwares (all tools are on one machine): 1. RAM 512MB, HDD 20GB, CPU 800MHZ 2. Windows 2000 Advanced Server 3. Oracle 8i releas 1.7 4. Oracle 9i Application Server 5. Oracle Portal Installation steps was done very well using the installation manuals, and it didn't occur any error or problem in this way. About Application Server and Oracle Portal I did it based on the Minimum Installation and default setting (like portal30, poratl30_sso, ..), but I have a few problem yet. 1. Is it OK to install all above softwares in one machine 2. As you know both oracle8i DB(DataBase) and AS(Application Servert) install an HTTP Server. Do we need both of them at the same time If it's not true, which one should be statrted What's the differences between them Starting The HTTP Server powered by Apache via : Statr-> Programs-> Oracle8i-iSuites-> Orcale HTTP Server-> Start HTTP ... takes much time that I think it's not working, but via the Services program it's started quickly. Which path is OK and why the first way doesn't work 3. For Installing AS, which services should be up and finally after installign AS and portal, which one 4. For using Oracle Portal I type this address in IE(Internet Explorer): http://ntoracleportal/pls/admin_/gateway.htm (note: ntoracle portal is my machine name) but it is redirected to this address: http://ntoracleportal/pls/portal30/a...chema=portal30 and then this error is displayed: Proxy log On failed. Please verify that you have specified correct connectivity information i.e.username, password & connect-string in the Database Access Descriptor Error-Code:6401 Error TimeStamp:Fri, 15 Mar 2002 00:03:36 GMT Database Log In Failed TNS is unable to connect to destination. Invalid TNS address supplied or destination is not listening. This error can also occur because of underlying network transport problems. Verify that the TNS name in the connectstring entry of the DAD for this URL is valid and the database listener is running. What shoud I do at this point Can I configure DAD or other things by hand Is there any user to connect to Portal except the default users (like portal30, portal30_sso and so on) a question about apache : 5. DocumnetRoot directive in httpd.conf determines default directory for html files , but what's the default file name in this directory
VIEWS ON THIS POST

38

Posted on:

Wednesday 7th November 2012
View Replies!

Overriding an RMAN backup set/piece

Hi DBA's, I do take cold backups of my database (96G) using RMAN (to disk). My configuration parameter for disk storage is as follows: CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT $ORACLE_BASE/backup/db_name/%U'; This configuration creates a backup set with 3 pieces. Now, i need to set the configuration such that every time a backup is taken, it should override the present set/pieces & replace them with a new set/pieces, such that the old set/pieces would be automatically deleted. Is there the possibility of doing this Please help...
VIEWS ON THIS POST

130

Posted on:

Wednesday 7th November 2012
View Replies!

.NET Data Provider for Oracle or ODP.NET with ASP.NET 2.0 (C#) bugs

I have been trying to use either .NET Data Provider for Oracle or ODP.NET in my ASP.NET application with C#. Have to read / store Session data in a Database column BLOB (using Serialization). Using either .NET Data Provider for Oracle or ODP.NET generating below errors. 1) Haveadded reference toasp.net Project and usedSystem.Data.OracleClientinC# class with .NET Data Provider for Oracle. But still gettting same errors, to get rid of these errors Have de-installed .NET Data Provider for Oracle and installed ODP.NET 2) Even now after ODP.NET installation my errors as shown below. Error38'ASP.serilization_aspx.GetTypeHashCode()': no suitable method found to overridec:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\3102d4b3\4aab618\App_Web_qfuaermo.12.cs323 Error39'ASP.serilization_aspx.ProcessRequest(System.Web.HttpContext)': no suitable method found to overridec:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\3102d4b3\4aab618\App_Web_qfuaermo.12.cs327 Error40'ASP.serilization_aspx' does not implement interface member 'System.Web.IHttpHandler.IsReusable'c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\3102d4b3\4aab618\App_Web_qfuaermo.12.cs147 Error41Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).C:\Visual Studio Projects\ERO\Web\Serilization.aspx.cs1333C:\...\Web\
VIEWS ON THIS POST

106

Posted on:

Wednesday 7th November 2012
View Replies!

Connect to Oracle and Access

I need a script where i can easy change a kind of connection string to use Oracle or Access. What is the best way to do this. I've got this code: OleDbConnection conn; OleDbCommand comm; OleDbDataReader dr; conn = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\\db1.mdb"); comm = new OleDbCommand("Select * from Table1",conn); conn.Open(); dr = comm.ExecuteReader(); DataGrid1.DataSource = dr; DataGrid1.DataBind(); conn.Close(); But can i use this connection also for the oracle database
VIEWS ON THIS POST

40

Posted on:

Wednesday 7th November 2012
View Replies!

I've got a problem with MyODBC

My problem is that i dont know the provider name for my ConnectionString, here is my code: Dim Connect As OleDbConnection = New OleDbConnection Dim Adapter As OleDbDataAdapter= New OleDbDataAdapter Dim ConnectString As String ConnectString="PROVIDER=(HEREIS MY PROBLEM\t\t);DRIVER={MySQL ODBC 3.51 Driver};" & _ "SERVER=localhost;" & _ "DATABASE=pruebaasp;" & _ "UID=root;" & _ "PASSWORD=root;" & _ "OPTION=3;"
VIEWS ON THIS POST

153

Posted on:

Wednesday 7th November 2012
View Replies!

How to get export data from Excel sheet?

, I need to export the data from Excel sheet to Sql server. what is the right procedure to attain this task Should I add Microsoft.Office.Interop.Excel dll or Microsoft Excel 12.0 Object Library\tWhat is the RIGHT way and difference between these two
VIEWS ON THIS POST

90

Posted on:

Wednesday 7th November 2012
View Replies!

Connection to Informtica PowerCenter

I can't connect my sql server database to powercentre: Here's how I connect to SqlServer Management Studio: ServerType:DatabaseEngine ServerName:ACER-EF3CBDCE91\SQLEXPRESS Authentification:Windowsauthentification But when I try to connect to PwerCenter: Here what I need to fill out: Database Type : SQLServer DatabaseUrl: (I Wrote: Localhost but didn't work) DatabaseUserID: ACER-EF3CBDCE91\yashiro DatabasePassword: ********(the password of windows startup) Database Service Name: ACER-EF3CBDCE91\SQLEXPRESS
VIEWS ON THIS POST

83

Posted on:

Wednesday 7th November 2012
View Replies!

MySQL and asp.net Table Adapters - Error when trying to use Subquery instead of join

I have been trying to create a sql statement that uses a subquery to join 2 oracle tables to create a strongly typed table adapter. For example: Select productName, (select categoryName from categories where categories.category_id = products.category_id) as Category from Products The ASP .Net tutorial I am working through recommends using subqueries instead of joins for the insert, update and delete commands to be automatically generated by Visual Studio 2010. When Iclick Finish in the table adapter wizard I get the following error (I am using MySQL version 5.1 and the MySQL Data Connector 6.3.5) Generated SELECT statement. \t\t\t\t\t Error in SELECT clause: expression near SELECT. \t\t\t\t\t Error in SELECT clause: expression near FROM. \t\t\t\t\t Missing FROM clause. \t\t\t\t\t Error in SELECT clause: expression near,. \t\t\t\t\t Unable to parse query text.
VIEWS ON THIS POST

107

Posted on:

Wednesday 7th November 2012
View Replies!

Pass array to sp

, I am trying to pass an array of numbers to my sp. I used this example to extend my code: http://www.oracle.com/technology/sample_code/tech/windows/odpnet/howto/arraybind/index.html But I always get the error: Specified cast is not valid. If I bind the result to a dataset. If I take a look at the ExecuteNonQuery then it returns -1. Here is my code: DimconnAsNewOracle.DataAccess.Client.OracleConnection(ConfigurationSettings.AppSettings("OracleConnection")) conn.Open() DimCommAsNewOracleCommand("Array_Test",conn) Comm.CommandType=CommandType.StoredProcedure DimpOutputAsOracleParameter pOutput=Comm.Parameters.Add("sys_refcursor",OracleDbType.RefCursor) pOutput.Direction=ParameterDirection.Output 'DimarStoresAsInt32()={1,2,3} DimarStoresAsInt32()={1} Comm.ArrayBindCount=1 Comm.Parameters.Add("StoreNosParam",OracleDbType.Int32) Comm.Parameters("StoreNosParam").Value=arStores Comm.Parameters("StoreNosParam").Direction=ParameterDirection.Input Response.Write(Comm.ExecuteNonQuery().ToString()) 'Response.End() DimdsAsNewDataSet DimadpAsNewOracleDataAdapter(Comm) adp.Fill(ds) 'bindthegrid DataGrid1.DataSource=ds DataGrid1.DataBind() And here is my sp: CREATE OR REPLACE PROCEDURE CUSTOM.Array_Test (sys_refcursor OUT SYS_REFCURSOR, StoreNosParam in number default 0) as BEGIN open sys_refcursor for SELECT .... Where some field = StoreNosParam; END Array_Test; Ideally I would want to run the select for each of storno and fill the dataset with it.
VIEWS ON THIS POST

65

Posted on:

Wednesday 7th November 2012
View Replies!

Connecting to MySQL database on a server

Hi ,I'd like to ask about connecting to MySQL database on the hosting server.I had purchased a domain and with the package they provide MySQL 5.0.22 version, I'm working on the design from my laptop, and I've read about the connector and how to connect on this topic http://forums.asp.net/t/1288372.aspxwhich is very useful for me.My question is should this connector be installed on my laptop(development environment) or the server of the database
VIEWS ON THIS POST

71

Posted on:

Wednesday 7th November 2012
View Replies!

Database Table Column to Array or String? (VB)

I have a (MySQL) database table column, where each table may have a different number of rows. I would like to, in one trip to the db, take one column from a table and either make an array from it or put each row into a string, for later use as a text label. Basic column is like this (example data): Soccer Cricket Rugby Aussie Rules I've researched two ways of doing this. The first way, below, I'm not sure how to get the data back out. The second way, I know how to get the data out, but not how to get it in from the table to begin with or how/if it will work because the array size could be different each time. First way:Dim SQLda as New SQLDataAdapterDim SQLTable as new Data.DataTableDim SQLRow as Data.DataRowDim Value as StringSQLda = New SQLDataAdapter(SQL_SELECT_STATEMENT, CONNECTION_STRING)SQLDA.Fill(SQLTable)For Each SQLRow in SQLTable.Rows Value = SQLRow(Column_Name).toStringNext-=-=Second way:Sub Main() Dim sport(5) As String'declaring an arraysport(0) = "Soccer"sport(1) = "Cricket"sport(2) = "Rugby"sport(3) = "Aussie Rules"sport(4) = "BasketBall"sport(5) = "Hockey" 'storing values in the arrayWriteLine("Name of the Sport in the third location" & " " & sport(2))'displaying value from array-=-=-=-As always, any input would be much appreciated.Jay
VIEWS ON THIS POST

69

Posted on:

Wednesday 7th November 2012
View Replies!

SQL Syntax error

Any ideas what is wrong with this: Dim cmd As New MySqlCommand("SELECT * FROM Messages WHERE Read = 'No'", conn) I get the following error: 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 'Read = 'No'' at line 1
VIEWS ON THIS POST

125

Posted on:

Wednesday 7th November 2012
View Replies!

MSSQL in a MySQL database?

Is it possible to use a MSSQL in a MySQL database I signed up for a homepage/webhotell that can run al the latest Visual Studio asp.net stuff..... bug i did just now find out that they use a MySql database, and I have made my program/webpage with Visual Studio 2008 and with a MsSql database. Is there a way to make it work in a mysql database Or do I havet to go another place and get a place where it is a mssql database
VIEWS ON THIS POST

74

Posted on:

Wednesday 7th November 2012
View Replies!

ODBC.NET for Oracle 10G

I had downloaded ODBC.NET drivers for Oracle 10G from Oracle website - http://www.oracle.com/technology/software/tech/windows/odbc/htdocs/utilsoft.htmlunder the section Oracle ODBC Drivers for Oracle 10.1 - Please confirm whether this is the right version for my database. I got an .exe file. Once executing it, I got all the required extracts from that .exe. NowI need to know how to install using these extracts for ODBC.NET driver. Other thing is ODP.NET is just a batch file. Executing that I got some DLL's which I am not sure the drivers are correctly installed in my machine. Pl help me out.
VIEWS ON THIS POST

36

Posted on:

Wednesday 7th November 2012
View Replies!

using a dbreader to populate a grid

I have been searchign all afternoon, and the simple code that I thought would work doesn't. I have a grid on my main page. \t \t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\t\t in my code behind page I am trying to populate it, since using a datasource would not let me join tables.. \t\t\t\t\t\t\t string sSQLQuery = "SELECT ID, STATUSID, REQUESTTYPE, ACTIONDATE, TOKEN FROM T_REQUEST"; \t\t\t\t\t\t\t OracleCommand dbCmd = new OracleCommand(sSQLQuery, dbConn); \t\t\t\t\t\t\t dbConn.Open(); \t\t\t\t\t\t\t OracleDataReader dbReader = dbCmd.ExecuteReader(); \t\t\t\t\t\t\t RequestGrid.DataSource = dbReader; \t\t\t\t\t\t\t RequestGrid.DataBind(); If instead of the 2 RequestGrid lines I put \t\t\t\t\t\t\t int recordsAffected = 0; \t\t\t\t\t\t\t while (dbReader.Read()) \t\t\t\t\t\t\t\t\t { \t\t\t\t\t\t\t\t\t // NOTE: This will only return the correct value for the SELECT statement \t\t\t\t\t\t\t\t\t recordsAffected++; \t\t\t\t\t\t\t\t\t } I get a count of 6, which is the correct number of rows affected. How do I get the grid to go through the results of the query
VIEWS ON THIS POST

147

Posted on:

Wednesday 7th November 2012
View Replies!

Using Wild card characters inside command statements

, I am trying to create a SQL query based on users input of three fields. RoomNo (Optional field), Capacity (mandatory) and Room type(mandatory). I want to use LIKE clause in the where statement to return matching records of RoomNo and RoomType. How can I achieve this using this statement objCmd = new MySqlCommand("select * from Rooms WHERE Capacity >= Capacity AND RoomType like RoomType% OR RoomNo like RoomNo group by RoomNo order by capacity desc",oMySqlConn ); objCmd.Parameters.Add("RoomNo", txtRoomNo.Text.Trim()); objCmd.Parameters.Add("RoomType", txtRoomType.Text.Trim()); objCmd.Parameters.Add("Capacity", MySqlDbType.Int32, 3).Value = txtCapacity.Text.Trim(); objCmd.Parameters.Add("RescName", lstResources.SelectedItem.Value); oMySqlConn.Open(); objRdr = objCmd.ExecuteReader(); myRepeater.DataSource = objRdr; myRepeater.DataBind();
VIEWS ON THIS POST

126

Posted on:

Wednesday 7th November 2012
View Replies!

newbi - how to I configure MySql?

, I'm having trouble getting hebrew to show up in my DB, so I think there's a configure option i need to change. From reading the manual I think I need to run this command: ./configure --with-charset=hebrew But I don't even know where to type "./configure --help" (in the command line). I tried in the bin folder, I tried after I start the server and before... I'm lost. Am I in the right direction here can anyone help pointers would be greatly appreciated!
VIEWS ON THIS POST

145

Posted on:

Wednesday 7th November 2012
View Replies!

SQLite error "SQLite error no such table:"

I am developing windows mobile application. I am using SQLite for database. using System.Data.SQLite; using System.IO; SQLiteConnection con = new SQLiteConnection(); \t\t\t\t\t try \t\t\t\t\t { \t\t\t\t\t\t\t string path = @"new.db"; \t\t\t\t\t\t\t if (File.Exists(path)) \t\t\t\t\t\t\t { \t\t\t\t\t\t\t\t\t con.ConnectionString = "Data Source="+ path; \t\t\t\t\t\t\t } \t\t\t\t\t\t\t con.Open(); \t\t\t\t\t\t\t SQLiteCommand cmd = con.CreateCommand(); \t\t\t\t\t\t\t SQLiteDataAdapter DB = new SQLiteDataAdapter("select name from user", con); \t\t\t\t\t\t\t DataSet ds = new DataSet(); \t\t\t\t\t\t\t DB.Fill(ds); \t\t\t\t\t\t\t label1.Text = ds.Tables[0].Rows[0][0].ToString(); \t\t\t\t\t } \t\t\t\t\t catch (Exception ex) \t\t\t\t\t { \t\t\t\t\t } \t\t\t\t\t finally \t\t\t\t\t { \t\t\t\t\t\t\t con.Close(); \t\t\t\t\t } Here I getting error "SQLite error no such table:user" Anyone having solution please share with me
VIEWS ON THIS POST

169

Posted on:

Wednesday 7th November 2012
View Replies!

Win 7 64 bit dev machine, Win 2K3 32 bit production box, Oracle 10g which clients do I need to run?

As the title says I have a Win 7 64 bit dev machine, Win 2K3 32 bit production box and I run against Oracle 10g whichOracleclients do I need to run Do I need to run the Oracle 32 and 64 bit clients And if so what versions
VIEWS ON THIS POST

138

Posted on:

Wednesday 7th November 2012
View Replies!

load infopath form ?

I want to use C# code to load infopath form inside the asp.net page, how should I do it I hope that one expert can show me a good sample
VIEWS ON THIS POST

264

Posted on:

Wednesday 7th November 2012
View Replies!

pass empty form fields as nulls and not empty strings

hi, i have some optional fields, that are optional but also unique - when the user doesnt fill them, they are passed as empty strings and the second time this happens i get a "duplicated entry" cause the column is unique and i try to insert a second empty string. how can i pass empty fields as nulls and not empty string second question - ive reached the point i need to start working with the data on the webapp, i worked on the design untill now - so whats the first step i have a dal and bl i build- should i start by creating a typed dataset or its already old fashioned whats are the first steps thanx,
VIEWS ON THIS POST

136

Posted on:

Wednesday 7th November 2012
View Replies!

SQL question

Iuse vs.net 2005 using a db2 database. But if the help you provide my is in t-sql that is now problem I can translate it. I tried to explain the best I can but it is very difficult to do. Here it goes. I have three history tables. Teacher, student and school. School and teacher, and school and student are linked together. I need to make a query that makes in one query a temporary table that list all the students that had a teacher change at some given date in the past. For example: If I give the query the following date 01/01/2007 it needs to give me all the student that had a teacher change. But the table history teacher doesn't have a link with the history student table. So I need to search the history school table to find the student id. There are three things that can happen: 1st: I give the date 01/01/2007 in so I need to look for this date in the history teacher table. If the school id is not null the teacher hasn't been deleted. Than I need to now if it change from school. I need to do that by searching the change that happened before the date I gave up. If the school id's are identical the teacher is still at the same school. So I only need to look for the first teacher id in the history school table to get the student id. 2nd: If the school id did change I have to look for the first and second teacher id in the history school table to get the student id. 3rd: If the school id is null I need to look for the second teacher id in the history school table. Sorry for my bad English
VIEWS ON THIS POST

78

Posted on:

Wednesday 7th November 2012
View Replies!

Oracle Raptor

For anyone developing with Oracle (in my case Oracle 10g) I would recommend checking out Oracle Raptor. It has a host of tools that make development easier.
VIEWS ON THIS POST

41

Posted on:

Wednesday 7th November 2012
View Replies!

SqlDataSource and MySql

How I configure SqlDataSource to work with MySql .Net Connector 1.0.6 in VWD Please!! Thks! Ubirat
VIEWS ON THIS POST

84

Posted on:

Wednesday 7th November 2012
View Replies!

inserting field name from dropdown into query

I'm making a search page for a phone directory in ASP.NET 2.0 with the VWD. It can search (in theory) by last name, first name, and location. Each of these corresponds to a table column in the directory table. I also have a textbox to enter a search term with. My query looks like: SELECT first, last, phone FROM directory WHERE ( xxx LIKE 'yyy'); The yyy part is where the search term goes, like sm, smi, smith. This works and I have no problem with this part. I did use a parameter (SelectParameters/ControlParameter) for this. The part I'm having problems with is inserting the field name into the xxx part of the query. I tried to use a parameter for this, but the field name gets inserted with single quotes, like 'xxx'. This will not work because of the quote marks being added to the field name. I've tried using MyDropdown.SelectedValue in the xxx part, and this doesn't work either. Can anyone suggest a solution to this problem. I can't imagine that inserting a field name into a query isn't common. There has got to be a way of doing this.
VIEWS ON THIS POST

113

Posted on:

Wednesday 7th November 2012
View Replies!

Use Rman backup data to Win2k server

The main Database is IBM Server running OPS Recovery catalog is create on a Win2k server. I want backup IBM Server's Data as a file on win2000. Win2K's E:\ disk is about 40G. Everything looks like OK before the follow: On NT2000 execute: c:\ornt\bin\rman target sys/sys@IBM rcvcat rman/rman@NT rman>run { allocate channel d1 type disk; backup incremental level 0 format 'e:\%d_%s_%p' (database include current controlfile); release channel d1;} rman>exit; I want to backup Data as a Win2k's file name "E:\ora1..." But I found file on $ORACLE_HOME/dbs/ and file name is "e:\ora1..." How should I do Sorry for my poor english.
VIEWS ON THIS POST

107

Posted on:

Thursday 15th November 2012
View Replies!

URGENT

I created a database on NT, but I forgot to created services before ( with ORADIM80 ). Is it too late to create services \t can I create them and how Please urgent response.
VIEWS ON THIS POST

55

Posted on:

Thursday 15th November 2012
View Replies!

Shared sql area v/s Private sql area

What is difference between shared sql area and private sql area
VIEWS ON THIS POST

50

Posted on:

Thursday 15th November 2012
View Replies!

semaphores issue

Hi , Can anyone help me to find out semaphores values calculations to set in /etc/system file needed for oracle. we have sunOS 5.8,oracle 8.1.6.3
VIEWS ON THIS POST

114

Posted on:

Thursday 15th November 2012
View Replies!

script required for comapring schemas

can anybody give me the script by which i can compare two schemas i know there are many tools to comare but i need script it is very much required
VIEWS ON THIS POST

84

Posted on:

Thursday 15th November 2012
View Replies!

restricted session & job queue

I have a job scheduled run every 10 sec in job queue submit by account "prod". Job running smoothly. user "prod" has privilege alter ssession and restricted session. now I issue: alter system enable restircted session; I can login using user "prod" and do normal work, but the job which was running smoothly, now can not "restart" again. (I can manualy run the job using dbms_job.run) does anyone can tell me: how to make this job "restart" Dees any additonal privilge need to be granted to this user
VIEWS ON THIS POST

101

Posted on:

Friday 16th November 2012
View Replies!

Restrict user privs

I have some tables that have grant select to public. So, by default, when I create a new user, the user is allowed to select data from these tables. Now business rules have changed. I need to give select priv to on only selected tables, but these tables have grant select to public priviously assigned. Without revoking this grant, is there any way that I can restrict selected users not to select data from these tables
VIEWS ON THIS POST

115

Posted on:

Friday 16th November 2012
View Replies!

Query Help!

The following query select the most senior with the highest salary from each department. Do you have a better way to do it Can you use correlated-subquery to achive this Thank you! select x.* from (SELECT deptno, ename, hiredate, sal, ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY hiredate asc, sal desc) AS senior_rich FROM emp) x where senior_rich =1 SQL> / DEPTNO ENAME HIREDATE SAL SENIOR_RICH ---------- ---------- --------- ---------- ----------- 10 CLARK 09-JUN-81 2450 1 20 SMITH 17-DEC-80 800 1 30 ALLEN 20-FEB-81 1600 1 FYI: SQL> select * from emp; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7369 SMITH CLERK 7902 17-DEC-80 800 20 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30 7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30 7566 JONES MANAGER 7839 02-APR-81 2975 20 7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30 7698 BLAKE MANAGER 7839 01-MAY-81 2850 30 7782 CLARK MANAGER 7839 09-JUN-81 2450 10 7788 SCOTT ANALYST 7566 19-APR-87 3000 20 7839 KING PRESIDENT 17-NOV-81 5000 10 7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30 7876 ADAMS CLERK 7788 23-MAY-87 1100 20 7900 JAMES CLERK 7698 03-DEC-81 950 30 7902 FORD ANALYST 7566 03-DEC-81 3000 20 7934 MILLER CLERK 7782 23-JAN-82 1300 10 14 rows selected.
VIEWS ON THIS POST

46

Posted on:

Friday 16th November 2012
View Replies!

Please help! Urgent

Hi all! I got these four tables: (staff, courses, students, enroll) STAFF: STAFFID STAFFNAME DEPT POSITION ------- ------------------------- --------------- -------------------- t101 Adams Art Professor t202 Smith History Lecturer t105 Tanaka CSE Tutor t110 Byrne Maths Lecturer t221 Smith CSE Professor COURSES: COURSENO STAFFID SCHED ROOM ------- ------- --------- ---- art103a t101 mwf9 h221 cse201a t105 tuthf10 m110 mth101b t110 mtuth9 h225 hst205a t202 mwf11 h221 mth103c t110 mwf11 h225 cse203a t105 mthf12 m110 Students: STUID STUNAME MAJOR CREDITS ----- ------------------------------ --------------- ---------- s1001 Smith, Tom History 90 s1010 Burns, Edward Art 63 s1015 Jones, Mary Maths 42 s1002 Chin, Ann Maths 36 s1020 Rivera, Jane CSC 15 s1013 McCarthy, Owen Maths 9 Enroll: COURSENO STUID GRADE ------- ----- ----- art103a s1001 A cse201a s1020 b cse201a s1002 f art103a s1010 art103a s1002 d mth101b s1020 a hst205a s1001 c mth103c s1010 mth103c s1002 b Q1. can anyone tell me how I could show the count for ALL staff(including the ones who have zero room count) I did this but can't show zero: SELECT STAFF.STAFFID, STAFF.POSITION, STAFF.STAFFNAME, COUNT(DISTINCT COURSES.ROOM) AS RM_COUNT FROM STAFF, COURSES WHERE STAFF.STAFFID=COURSES.STAFFID GROUP BY STAFF.STAFFID; Q2. can anyone tell me how to write the query the find the total number of students who either take at most one course (over the course of the week) or do not attend a class on tuesday
VIEWS ON THIS POST

122

Posted on:

Friday 16th November 2012
View Replies!

Oracle System Privilege - Administer Security

Can anyone tell me what this privilege is and better yet where there might be some documentation on this privilege. I have searched the web and Oracle documentation for both 9i and 10G and can't find any reference to it other than the name.
VIEWS ON THIS POST

47

Posted on:

Friday 16th November 2012
View Replies!

'IN operator' for dates in sql

hi, Do anyone know how to use IN operator for date values I have 1 query as below, which I can put any date value to retrieve the data but when I execute I getORA-01843: not a valid month. select* fromtable wheretime_stampIN('02/28/2012','07/22/2012','09/29/2012') Sample result: Num Qty Time_stamp 1 2 02/28/2012 2 2 07/22/2012 3 2 09/29/2012 Any idea how to solve this Instead of using IN operator, is that others way\t
VIEWS ON THIS POST

166

Posted on:

Tuesday 20th November 2012
View Replies!