How to update data returned using REF CURSOR

Hi all, I am trying to update updated data in a gridview but the update button seem to do nothing as i retreive data using REF CURSOR. Let me describe the architecture of my application first. I'm trying to implement best practice whenever possible. I am following the data access tutorial published in , the only difference is that i have an Oracle (10g) database. So I split my application into three layers, data access, business logic, and presentation layer. I'm also writing all queries in an Oracle package. So here is the code i am using: Oracle Package: the CRUD functions. Notice the first procedure (READ)returns a REF Cursor
/*===================TABLE:TF_REF_TYPES===============================*/ /*=======================================================================*/ PROCEDUREget_ref_type(ref_type_cursorOUTT_CURSOR)AS BEGIN OPENref_type_cursorFOR SELECTref_type_id,ref_type FROMtf_ref_types; ENDget_ref_type; PROCEDUREcreate_ref_type(p_ref_typeINVARCHAR2,p_created_byINVARCHAR2)AS BEGIN INSERTINTOtf_ref_types(ref_type,created_by,created_date) VALUES(p_ref_type,p_created_by,SYSDATE); ENDcreate_ref_type; PROCEDUREupdate_ref_type(p_ref_typeINVARCHAR2,p_ref_type_idINNUMBER,p_updated_byINVARCHAR2)AS BEGIN UPDATEtf_ref_types SETref_type=p_ref_type, updated_by=p_updated_by, updated_date=SYSDATE WHEREref_type_id=p_ref_type_id; ENDupdate_ref_type; PROCEDUREdelete_ref_type(p_ref_type_idINNUMBER)AS ref_type_countNUMBER; BEGIN --Verifythatnoreferencesareusingthereferencetype. SELECTCOUNT(ref_id)INTOref_type_count FROMtf_references WHEREref_type_id=p_ref_type_id; IFref_type_count>0THEN raise_application_error(-20018,'Therecordcannotbedeletedbecausethereistableincludingrelatedrecords.$'); ELSE DELETEFROMtf_ref_types WHEREref_type_id=p_ref_type_id; ENDIF; ENDdelete_ref_type; The I have xsd file that define a tableAdapter that uses the procedures defined above. Next I have a .cs file where my business logic will be and calls the function fromthe xsd file. And I am assuming that this is where i need to make the change to allow row updates.
[System.ComponentModel.DataObject] public class ReferencesTypeBLL { private REF_TYPETableAdapter _refTable = null; protected REF_TYPETableAdapter Adapter { get { if (_refTable == null) _refTable = new REF_TYPETableAdapter(); return _refTable; } } [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)] public References.REF_TYPEDataTable GetReferenceTypes() { Object x; return Adapter.GetRefType(out x); } [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)] public References.REF_TYPEDataTable GetReferenceTypeByID(int typeID) { Object x; if (typeID == -1) return GetReferenceTypes(); else return Adapter.GetRefTypeByID(typeID, out x); } [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)] public bool AddReferenceType(string REF_TYPE) { int rowsAffected = Adapter.Insert(REF_TYPE, "Admin"); return rowsAffected == 1; } [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public bool UpdateReferenceType(int REF_TYPE_ID, string REF_TYPE) { References.REF_TYPEDataTable refType = GetReferenceTypeByID(REF_TYPE_ID); if (refType.Count == 0) return false; /*References.REF_TYPERow typeItem = refType[0]; typeItem.REF_TYPE_ID = typeID; typeItem.REF_TYPE = value;*/ int rowsAffected = Adapter.Update(REF_TYPE, REF_TYPE_ID, "Admin"); return rowsAffected == 1; } } Presentation Layer:
<asp:DetailsView ID="DetailsView1" runat="server" owPaging="True" AutoGenerateRows="False" DataKeyNames="REF_TYPE_ID" DataSourceID="ObjectDataSource1" Height="50px" Width="125px"> <Fields> <asp:BoundField DataField="REF_TYPE_ID" HeaderText="REF_TYPE_ID" ReadOnly="True" SortExpression="REF_TYPE_ID" /> <asp:BoundField DataField="REF_TYPE" HeaderText="REF_TYPE" SortExpression="REF_TYPE" /> <asp:CommandField ShowEditButton="True" ShowInsertButton="True" /> <asp:Parameter Name="REF_TYPE" Type="String" />

Posted On: Wednesday 7th of November 2012 02:48:39 PM Total Views:  152
View Complete with Replies

Related Messages:

updateing an informix table   (201 Views)
I have an informix table that I need to update an amount in. Thefield is called encumbrance is a type number. In my VWD2005 I am using VB and I have a field called NewEncumbrance as type Double. Here is what I have so far: Tell me where I am goingwrong. ExecNonQuery( ExecNonQuery("UPDATE [gl_main] SET [encumbrance] = " & NewEncumbrance & " WHERE [account_no] = " & AccNo)
How to update two tables using code behind/session vars   (104 Views)
all, I'm getting farther along but seem to have hit a snag. I am trying to update two tables when user hits submit button via code behind. I have my queries written and I've set the session vars so I can do an update query. The main problem I have is I am confused on how to do a query from code behind. I used to know but I've forgotten, guess the old don't use it you lose it story is true. Does anyone have a simple example of this Any assistance would be greatly appreciated and
how to update row in excel using OleDB?   (230 Views)
I am importing data from excel file. According to the values on each row, i want to write some statement in the last column. I want to do this without having to install Office or the Redistributable Primary Interop Assemblies Package. I saw a similar example saying it can be done using only OleDB, something like : command.CommandText="Update[Cities$]SetCity= \"Venice\"WHEREID=1"; command.ExecuteNonQuery(); But this wont work the way i am reading the spreadsheet. My code is like this :: string ExelConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};" + "Mode=ReadWrite;ReadOnly=false;" + "Extended Properties=\"Excel 8.0;HDR=No;IMEX=1\";", Server.MapPath("./Uploads/" + excelName)); OleDbDataAdapter ExcelDataAdapter = new OleDbDataAdapter("SELECT * FROM [Sheet1$A8:AZ]", ExelConnectionString); DataSet objDataSet = new DataSet(); ExcelDataAdapter.Fill(objDataSet, "ExcelTable"); for (int r = 0; r < dataTable.AsEnumerable().Count(); r++) { Slab slb = new Slab(); slb.ReceiveDate = dataTable.Rows[r].Field(0); slb.VesselName = dataTable.Rows[r].Field(1); slb.Lot = Convert.ToInt16(dataTable.Rows[r].Field(2)); slb.SlabSource = dataTable.Rows[r].Field(3); slb.CertificateNumber = dataTable.Rows[r].Field(4); if (DateTime.Compare(DateTime.Now, slb.ReceiveDate)>0) dataTable.Rows[r].Field(5) = "time travel not possible yet"; // the above line is of course wrong, but i need something like this. } The end result would be to read each row in the excel file and output something in the last column.
How to update database after client information is in there   (198 Views)
, What is the best way to update a database (say add a table or change an existing table) when the database is already live and has client data in it This looks tricky, so i'd like to get some feedback before going ahead.
could not update database from dataset in MS SQL server   (196 Views)
I have displayed data from the dataset in the datagrid in windows form, it displays perfectly. Now, what I want is, whatever changes I do in datagrid should be updated in the database. For this, i have written following code, but it is not working and it doesn't give error too. pls help me. Friend Shared Function updateManifest(ByRef ds As DataSet) Dim oConn As New SqlConnection(g_strDBConnectionString) Dim oCommand As New SqlCommand Dim oDataSet As New DataSet Try oConn.Open() oCommand.Connection = oConn oCommand.CommandText = "cst_edit_manifest" oCommand.CommandType = CommandType.StoredProcedure Dim param1 As New SqlParameter("@Manifest", SqlDbType.NVarChar, 256, "Name") Dim param2 As New SqlParameter("@Change", SqlDbType.Int, 4, "Bundles Req") Dim param3 As New SqlParameter("@RouteID", SqlDbType.NVarChar, 50, "Route ID") Dim param4 As New SqlParameter("@ChangeProdID", SqlDbType.Int, 4, "Product Code") Dim param5 As New SqlParameter("@BundleSize", SqlDbType.Int, 4, "Bundle Size") oCommand.Parameters.Add(param1) oCommand.Parameters.Add(param2) oCommand.Parameters.Add(param3) oCommand.Parameters.Add(param4) oCommand.Parameters.Add(param5) oDataAdapter.UpdateCommand = oCommand oDataAdapter.Update(ds) MsgBox("updated Successfully") Finally oConn.Close() oCommand.Dispose() oDataAdapter.Dispose() oConn.Dispose() oDataSet.Dispose() End Try End Function End Class
Edit insert update Delete cmds   (192 Views)
I have and oracle db and I am trying to write Edit insert update Delete cmds. I ma using the ODBC to connect to the database. When i use the data srouce that i drag out in degsin mode i make a select statement using the wizard looks like this SELECT [CLOCK_ID], [LAST_NAME], [FIRST_NAME], [WORK_PHONE], [HOME_PHONE], [CELL_PHONE], [EMAIL], [PRIMARY_DAY_PHONE], [PRIMARY_NIGHT_PHONE], [BLACKBERRY_NUMBER], But for some odd resson it does not like the brackets. and i query the db fine. but update does not work UPDATE [EMPLOYEES] SET [LAST_NAME] = , [FIRST_NAME] = , [WORK_PHONE] = , [HOME_PHONE] = , [CELL_PHONE] = , [EMAIL] = , [SECONDARY_EMAIL] = , [PRIMARY_DAY_PHONE] = , [PRIMARY_NIGHT_PHONE] = , [BLACKBERRY_NUMBER] = , [ADMIN] = WHERE [CLOCK_ID] = INSERT INTO [EMPLOYEES] ([CLOCK_ID], [LAST_NAME], [FIRST_NAME], [WORK_PHONE], [HOME_PHONE], [CELL_PHONE], [EMAIL], [SECONDARY_EMAIL], [PRIMARY_DAY_PHONE], [PRIMARY_NIGHT_PHONE], [BLACKBERRY_NUMBER], [ADMIN]) VALUES (, , , , , , , , , , , ) DELETE FROM [EMPLOYEES] WHERE [CLOCK_ID] = I have removed the brackets from all but still does not work Mike
insert update statements   (200 Views)
I have a connection to a MySQL database but only have the select statement. Does anybody have a link on how to setup a connection to include the insert, update and delete statements
problem with update query   (181 Views)
I am having problems with an update query. I am supposed to update a column in the table but when the update was executed, an error was thrown. The update query : Update book set description = ' " + bookDesc+ " ' where book_ID = 1; bookDesc is actually values taken from a textbox. However, the values contains single quotes. Is there any way to contain the values within "" so that non of the content in the bookDesc affects the actual update Meaning that the update will become something like Update book set description = ' "" + bookDesc+ "" ' where book_ID = 1; where the 2nd double quote is actually the container for the value.
multiple updates   (207 Views)
I want to have a form on my site what will bring up a number of rows of data from the MySQL database including the unique key and a user editable quantity field. Users will be able to modify mutliple rows on the form before submitting the page back. I have the page working to be able to identify which lines the quantities have been altered on and now need to be able to go back to the DB and update the relevant rows. For a single row update it is obviously the easy and along the lines of: UPDATE tablename SET quantitycolumn = 'info from form' WHERE uniquekey = 'hidden info from form' Where visitors update multiple rows I am uncertain how to most efficiently deal with these.... is there a way of joining the update commands
Help!!! Fail to update Oracle CLOB column on HP-UX   (84 Views)
I tried to update one CLOB column in Oracle 9i, but thesaved data in databaseis gibberish. Itonly happend when I use Transaction in .cs file. But if I remove the transaction related codes, it work. Environment: Client: Windows XP, Visual Studio 2005, System.Data.OracleClient 2.0 Server: HP-UX II for OS, Oracle 9i with American set as the Language and a character set of English US ASCII Hereare the code using transaction (not working version): stringselectSQL="selectconfigvaluefromappconfigwhereconfigid=1"; stringnewvalue=txtNewValue.Text.Trim();//use"testvalue"atwebform lock(this) { DataTabledt=newDataTable(); OracleConnectionconn=newOracleConnection(ConfigurationManager.ConnectionStrings["dbconn"].ConnectionString); OracleCommandcmd=newOracleCommand(selectSQL,conn); OracleDataAdapterda=newOracleDataAdapter(cmd); OracleCommandBuilderocb=newOracleCommandBuilder(da); cmd.UpdatedRowSource=UpdateRowSource.None; try { conn.Open(); da.Fill(dt); if(dt!=null&&dt.Rows.Count>0) { OracleTransactiontrans=conn.BeginTransaction(); cmd.Transaction=trans; try { dt.Rows[0][configfield]=newvalue; da.Update(dt); trans.Commit(); } catch(Exceptionee) { trans.Rollback(); } finally { if(conn!=null) { if(conn.State!=ConnectionState.Closed) conn.Close(); conn=null; } trans=null; } } } catch(Exceptionex) {} finally { if(conn!=null) { if(conn.State!=ConnectionState.Closed) conn.Close(); conn=null; } } } Anyone has any idea what's wrong with the code. It only happened with Transaction in .cs file. It's very weird.
Illegal Variable Name/Number on table update C#   (116 Views)
I am having trouble with updating the contents of a table in Oracle, I believe it is coming from trying to insert values of type Varchar2 as i'm not sure i'm doing it correctly. I have tried with both single and no quotes around the varchar2 values in the SQL statement and neither work. Anyone have any idea what is wrong here just a note: i have checked all the values going into the sql statement and they are valid and that should not be the problem. any help is very appreciated my code: public void UpdateSubLevel(ArrayList aList) { OracleConnection upd_con = new OracleConnection(); upd_con.ConnectionString = //connectionString upd_con.Open(); foreach (string[] upd_sub in aList) { OracleCommand upd_cmd = upd_con.CreateCommand(); OracleTransaction upd_trans; upd_trans = upd_con.BeginTransaction(IsolationLevel.ReadCommitted); upd_cmd.Parameters.Add("ev_ID", OracleDbType.Int32, 8).Value = Convert.ToInt32(upd_sub[0]); upd_cmd.Parameters.Add("su_Code", OracleDbType.Varchar2, 5).Value = upd_sub[1]; upd_cmd.Parameters.Add("su_Desc", OracleDbType.Varchar2, 50).Value = upd_sub[2]; upd_cmd.CommandText = "UPDATE BC_EVENT_SUBLEVEL SET SUBLEVEL_DESC = ':su_Desc' WHERE SUBLEVEL_CODE = ':su_Code' AND EVENT_ID = :ev_ID"; upd_cmd.ExecuteNonQuery(); upd_trans.Commit(); upd_trans.Dispose(); } upd_con.Close(); upd_con.Dispose(); }
problem with update row in mysql from dataset (something with SQL_C_NUMERIC)   (190 Views)
Good morning, I have some problem with inserting or updating rows(data types: int, decimal) to mysql db. Iam using dataset with dataadapter. Example of initialize: string SQLvybraneSluzby = "SELECT * FROM vybraneSluzby WHERE import=" + IDimportovaneCk; DAvybraneSluzby = new OdbcDataAdapter(SQLvybraneSluzby, connection); OdbcCommandBuilder objCommand7 = new OdbcCommandBuilder(DAvybraneSluzby); DAvybraneSluzby.Fill(DSkatalog, "vybraneSluzby"); DSkatalog.Tables["vybraneSluzby"].Columns["IDvybraneSluzby"].AutoIncrement = true; DSkatalog.Tables["vybraneSluzby"].Columns["IDvybraneSluzby"].AutoIncrementSeed = getMaxID("IDvybraneSluzby", "vybraneSluzby") + 1; When I call "DAvybraneSluzby.update()" , than-->> ERROR [07006] [MySQL][ODBC 3.51 Driver][mysqld-5.0.22-community-nt]Restricted data type attribute violation(SQL_C_NUMERIC) ,
cannot update or delete!!! - Resolved   (223 Views)
I feel like such an idiot because it looks like I must be the ONLY ONE IN THE WORLD having this problem. I'm googled and searched this forum and all over for some answers and I just can't find what I need. someone please please help me, I am losing my mind here!! I'm trying to make a page for adding and removing category rows from a mysql database. The database is small, and looks like this: MaincatID - integer (primary key autoinc) MaincatName - varchar(100) MaincatDescription - text I configured the connection with this string: DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=myDatabase;USER=myusername;PASSWORD=mypassword;OPTION=3; and when I configured the dataadapter, it generated the insert and select statements, here's what the insert statement looks like (and it works fine, I can insert!!) 'OdbcInsertCommand1 Me.OdbcInsertCommand1.CommandText = "INSERT INTO maincategories (MaincatName, MaincatDescription) VALUES (, )" Me.OdbcInsertCommand1.Connection = Me.connDB Me.OdbcInsertCommand1.Parameters.Add(New System.Data.Odbc.OdbcParameter("MaincatName", System.Data.Odbc.OdbcType.VarChar, 100, "MaincatName")) Me.OdbcInsertCommand1.Parameters.Add(New System.Data.Odbc.OdbcParameter("MaincatDescription", System.Data.Odbc.OdbcType.VarChar, 2147483647, "MaincatDescription")) but wouldn't generate the update or delete statements. I went into the properties and tried to create them myself. here is the code it generated 'OdbcUpdateCommand1 Me.OdbcUpdateCommand1.CommandText = "UPDATE maincategories set MaincatName=, MaincatDescription= WHERE MaincatID=" Me.OdbcUpdateCommand1.Connection = Me.connDB Me.OdbcUpdateCommand1.Parameters.Add(New System.Data.Odbc.OdbcParameter("MaincatName", System.Data.Odbc.OdbcType.VarChar, 100, "MaincatName")) Me.OdbcUpdateCommand1.Parameters.Add(New System.Data.Odbc.OdbcParameter("MaincatDescription", System.Data.Odbc.OdbcType.VarChar, 2147483647, "MaincatDescription")) Me.OdbcUpdateCommand1.Parameters.Add(New System.Data.Odbc.OdbcParameter("Original_MaincatID", System.Data.Odbc.OdbcType.Int, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MaincatID", System.Data.DataRowVersion.Original, Nothing)) 'OdbcDeleteCommand1 Me.OdbcDeleteCommand1.CommandText = "DELETE FROM maincategories WHERE MaincatID=" Me.OdbcDeleteCommand1.Connection = Me.connDB Me.OdbcDeleteCommand1.Parameters.Add(New System.Data.Odbc.OdbcParameter("MaincatID", System.Data.Odbc.OdbcType.Int, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "MaincatID", System.Data.DataRowVersion.Original, Nothing)) Now here is the code for my update: 'Update changes Dim updateMainCat As dsCategories.maincategoriesRow = dsCategories.maincategories.Rows.Find(lstMainCat.SelectedValue) updateMainCat.MaincatName = txtMainCatRename.Text daMainCategories.Update(dsCategories.maincategories) lstMainCat.DataBind() and here is the delete code: 'delete a row Dim deleteMainCat As dsCategories.maincategoriesRow = dsCategories.maincategories.Rows.Find(lstMainCat.SelectedValue) dsCategories.maincategories.Rows.Remove(deleteMainCat) daMaincategories.Update(dsCategories) lstMainCat.DataBind() but it doesn't do anything to the data in the database!! I receive no error, nor any indication that it tried to do ANYTHING. I am going out of my mind insane with this thing and I can't find ANY information on what is wrong. somebody, PLEASE help me!!! -SelArom
Neither update reacord nor displaying error   (86 Views)
please find my code below, this one neither giving the error nor updating the record. Public Function UpdateQuoteData(ByVal ObjDs As DataSet, ByVal strTableName As String, ByVal intQuoteId As Integer) Dim ObjDa As OracleDataAdapter Dim strSQL As String Dim strReturnText As String = "" Dim objtmpDs As New DataSet Dim connection As New OracleConnection(connStr) Dim ObjCmd As OracleCommandBuilder Try strSQL = "SELECT * FROM " & strTableName & " WHERE QUOTE_ID = " & intQuoteId ObjDa = New OracleDataAdapter(strSQL, _connection) ObjDa.Fill(objtmpDs, strTableName) ObjCmd = New OracleCommandBuilder(ObjDa) ObjDa.InsertCommand = ObjCmd.GetUpdateCommand objtmpDs = ObjDs ObjDa.Update(objtmpDs, strTableName) Catch ex As OracleException strReturnText = ex.Message Throw ex Finally If strReturnText = "" Then strReturnText = "OK" End If End Try ObjDa.Dispose() Return strReturnText End Function can anyone help me where the problem hides
How to update CLOB field   (102 Views)
one of the field in a table is having CLOB data type. There is big text in that field. Now I want to modify the value of the field (add some line of text in the same value) How to do this
update using Oracle stored procedure   (137 Views)
If I pass a null parameter to my procedure I get an error. What is the best way to avoid this error if my procedure receives a null value For example, here my stored procedure is below. Sometimes there is no value for the p_link_name2 or p_link_url2 . I get this error in my page onSubmit: System.Exception: Parameter 'p_link_name2': No size set for variable length data type: String CREATE OR REPLACE PROCEDURE p_update_mylinks ( p_renumber IN VARCHAR, p_link_name1 IN VARCHAR, p_link_url1 IN VARCHAR, p_link_name2 IN VARCHAR, p_link_url2 IN VARCHAR ) AS BEGIN UPDATE myLinks SET link_name1 = p_link_name1, link_url1 = p_link_url1, link_name2 = p_link_name2, link_url2 = p_link_url2 WHERE SUBSTR(renumber,3,7) = p_renumber; END; // code in the .aspx page: OracleCommand cmd = new OracleCommand("p_update_myLinks", cnYes32); cmd.CommandType = CommandType.StoredProcedure; OracleParameter p_renumber = new OracleParameter("p_renumber", OracleType.VarChar); OracleParameter p_link_name1 = new OracleParameter("p_link_name1", OracleType.VarChar); OracleParameter p_link_url1 = new OracleParameter("p_link_url1", OracleType.VarChar); OracleParameter p_link_name2 = new OracleParameter("p_link_name2", OracleType.VarChar); OracleParameter p_link_url2 = new OracleParameter("p_link_url2", OracleType.VarChar); p_renumber.Value = renumber.Substring(2,5); p_link_name1.Value = txtLinkName1.Text.Trim(); p_link_url1.Value = txtLinkAddress1.Text.Trim(); p_link_name2.Value = txtLinkName2.Text.Trim(); p_link_url2.Value = txtLinkAddress2.Text.Trim(); cmd.Parameters.Add(p_renumber); cmd.Parameters.Add(p_link_name1); cmd.Parameters.Add(p_link_url1); cmd.Parameters.Add(p_link_name2); cmd.Parameters.Add(p_link_url2); try { cnYes32.Open(); cmd.ExecuteNonQuery(); } catch { throw; } finally { cnYes32.Close(); }
how do I update multiple talbes in one stored procedure   (149 Views)
Here is my stored procedure used for entering a payment. I also want combine it with another stored procedure. How can I do this CREATE PROCEDURE Payment ( @clientID int, @amount money, @pmtDate nvarchar(20) ) AS Insert Into Payments ( clientID, amount, pmtDate ) Values ( @clientID, @amount, @pmtDate ) GO COMBINED WITH: CREATE PROCEDURE Payment2 ( @clientID int, @nextPmtDate nvarchar(20) ) AS UPDATE Clients SET dueDate=@nextPmtDate WHERE id=@clientID GO
Update the entitiy data model - update wizard (not responding) Sybase database   (102 Views)
When trying to build or update (even when adding a single table) the update wizard for the Entity Data Model takes forever to complete. I'm ok while selecting datasource and it reads the tables/view/procedures with success. When selecting a table to be updated in the model, the update wizard freezes with (Not Responding). This takes hours to complete, and even on completion, the table has not been added. I am using VS2010 with service pack 1. I've also turned on/off the checkboxes "include foreign key columns.." and "Pluralize or singularize generated objects..", but having them on or off does not change the "not responding" situation.
create/update dynamic column(in database) for view or table?   (97 Views)
Iwas wondering is i can create/updatedynamic column(from database)fornew view/table exmaple : I got a table which display the information of the Table Manager Dpet_id Dept_username 1 D_A 2 D_B Table Empolyee emp_id emp_username 1 E_A 2 E_B 3 E_C 4 E_D Table Dept_emp Dept Emp_username D_A E_A D_A E_B D_A E_C D_A E_D and now i need to create a new view which display D_username Emp_username1 Emp_username2 Emp_Username3 D_A E_A E_B E_C D_B E_D ___________________________________________________________________________ If a new emp is added into department D_A then the new view will create 1 more coloumn for the new employee eample the view will become : D_username Emp_username1 Emp_username2 Emp_Username3 Emp_Username4 D_A E_A E_B E_C E_E D_B E_D thx
How to Read an open Excel File which is updated Continuosly   (255 Views)
How to Read an open Excel File which is updated Continuosly. I have to read data from an excel file which is updated Continuosly on another server and it remains open all the time. Please suggest me the right way to proceed.