U can do by this way. ******Design****** AutoGenerateColumns="false" AllowPaging="True" > BackColor="#374E8C"> Wrap="False"> Wrap="False"> BackColor="#374E8C"> ******************** Code***************** DataTable dt = objclsDB.GetDataTable("Select PRICE from tblemp") GVCP.DataSource = dtCP; GVCP.DataBind();
AnilJayanti
Posts
-
Gridview -
how to select or get all values in listbox at pageloadWhere u binding these values in listbox ?? If u binding these in page_load then u can do it after binding some values in listbox. try like this.. http://www.java2s.com/Code/CSharp/GUI-Windows-Form/Getselectedcheckboxlistitems.htm
-
Diffrent way of listing Items in WinformsI think u can get it by dynamic creation of controls. First take a Panel in that u can add the controls one by one applying the height and width. By using LinkLabel control u can do redirection from one form to another. Definitely u can do in this way.
-
dataset with datagridI think the values which u r adding to the table in DB those are not reflecting in that table. Try like this, After adding values to the table dt.AcceptChanges(); // dt means DataTable
-
How to change [OracleCustomTypeMappingAttribute("SCOTT.GET2")]:SCOTT to TTT.GET2Hi, I have a problem in odp.net auto-generated files. I have created two types and one function with input and output parameters of object type params. I have generated the auto-generated class files for two types with my local Oracle 10g client software. in that i used Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.3)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORACLE)));User Id=scott;Password=tiger as a datasource. Auto-generated file was generated with , it's working in my system. i uploaded it to the server. In the server oracle user id,password is different. Now i want how to generate the auto-generated files with server's oracle userid and password. The auto-generated files should show like OracleCustomTypeMappingAttribute("MAINDB.GET2"), PLS HELP. Anil. :)
-
How to use user-defined-type input and output parameters in Oracle Function using ODP.NETThanxs for reply, Is any wrong in my code or functions code? then can u pls tell me a simple functions with object type parameters and c# code. anil.
-
How to use user-defined-type input and output parameters in Oracle Function using ODP.NETOhh Sorry, thnxs for reply me. I forgot to paste that lines . Now i applied that applied then another errors is coming. function GETDATA(id in GET1,data out GET2) return varchar2 is retval varchar(10); begin select GET2(dname,loc) into data from dept where deptno = GET1.deptno; retval := 'Result'; return retval; end; OracleCommand cmd = new OracleCommand("GETDATA", con); cmd.CommandType = CommandType.StoredProcedure; GET1 objget1 = new GET1(); GET2 objget2 = new GET2(); objget1.DEPTNO = 10; objget1.DEPTNOIsNull = false; //GET2[] get22 = null; OracleParameter retval = new OracleParameter(); retval.OracleDbType = OracleDbType.Varchar2; retval.ParameterName = "retval"; retval.Direction = ParameterDirection.ReturnValue; cmd.Parameters.Add(retval); OracleParameter inparam = new OracleParameter(); inparam.OracleDbType = OracleDbType.Object; inparam.Direction = ParameterDirection.Input; inparam.ParameterName = "id"; inparam.UdtTypeName = "GET1"; inparam.Value = objget1; cmd.Parameters.Add(inparam); OracleParameter outparam = new OracleParameter(); outparam.OracleDbType = OracleDbType.Object; outparam.Direction = ParameterDirection.Output; outparam.ParameterName = "data"; outparam.UdtTypeName = "GET2"; outparam.Value = objget2; cmd.Parameters.Add(outparam); con.Open(); cmd.ExecuteNonQuery(); Error like "ORA-03113: end-of-file on communication channel\nProcess ID: 0\nSession ID: 20 Serial number: 25". pls help.
-
How to use user-defined-type input and output parameters in Oracle Function using ODP.NETHi, I'm facing the problem when i'm executing the oracle function with input and output parameters which are object type. i givng my code below. I created two types for input and output parameter for a functions. type get1 as object(deptno number(5))NOT FINAL; TYPE GET2 AS OBJECT(DNAME VARCHAR2(14),LOC VARCHAR2(13))NOT FINAL; ///Function code : function getdata(id in get1,data out get2) return varchar2 is retval varchar(10); begin select get2(dname,loc) into data from dept where deptno = get1.deptno; retval := 'Result'; return retval; end; ///My .net code : OracleConnection con = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.3)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORACLE)));User Id=scott;Password=tiger"); OracleCommand cmd = new OracleCommand("getdata", con); cmd.CommandType = CommandType.StoredProcedure; GET1 objget1 = new GET1(); GET2 objget2 = new GET2(); objget1.DEPTNO = 10; GET2[] get22 = null; OracleParameter outparam = new OracleParameter(); outparam.OracleDbType = OracleDbType.Object; outparam.Direction = ParameterDirection.Output; outparam.ParameterName = "data"; outparam.UdtTypeName = "GET2"; outparam.Value = objget2; OracleParameter inparam = new OracleParameter(); inparam.OracleDbType = OracleDbType.Object; inparam.Direction = ParameterDirection.Input; inparam.ParameterName = "id"; inparam.UdtTypeName = "GET1"; inparam.Value = 10; con.Open(); cmd.ExecuteNonQuery(); when i'm executing the below error is coming. "ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'GET_DATA_NEW'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored" Pls help me.
-
How to set user-defined-type as Oracle SP input parameter in .NETHi, i givng my code below. I created two types for input and output parameter for a functions. type get1 as object(deptno number(5))NOT FINAL; TYPE GET2 AS OBJECT(DNAME VARCHAR2(14),LOC VARCHAR2(13))NOT FINAL; ///Function code : function getdata(id in get1,data out get2) return varchar2 is retval varchar(10); begin select get2(dname,loc) into data from dept where deptno = get1.deptno; retval := 'Result'; return retval; end; ///My .net code : OracleConnection con = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.3)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORACLE)));User Id=scott;Password=tiger"); OracleCommand cmd = new OracleCommand("getdata", con); cmd.CommandType = CommandType.StoredProcedure; GET1 objget1 = new GET1(); GET2 objget2 = new GET2(); objget1.DEPTNO = 10; GET2[] get22 = null; OracleParameter outparam = new OracleParameter(); outparam.OracleDbType = OracleDbType.Object; outparam.Direction = ParameterDirection.Output; outparam.ParameterName = "data"; outparam.UdtTypeName = "GET2"; outparam.Value = objget2; OracleParameter inparam = new OracleParameter(); inparam.OracleDbType = OracleDbType.Object; inparam.Direction = ParameterDirection.Input; inparam.ParameterName = "id"; inparam.UdtTypeName = "GET1"; inparam.Value = 10; con.Open(); cmd.ExecuteNonQuery(); when i'm executing the below error is coming. "ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'GET_DATA_NEW'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored" Pls help me.
modified on Tuesday, February 24, 2009 1:59 AM
-
How to set user-defined-type as Oracle SP input parameter in .NETHi, Pls tell me How to set user-defined-type as Oracle SP input parameter in .NET 2005 with oracle database 10g client. example : I created simple object type create or replace type TYP_address as object ( -- Attributes address VARCHAR2(500), ZIPCODE Varchar2(5) ) create table TAB_ADDRESS ( ADDRESS VARCHAR2(200), ZIPCODE VARCHAR2(5) ); create or replace procedure test_udt_sp(obj_address IN TYP_address ) is begin INSERT INTO tab_address(address,ZIPCODE) VALUES(obj_address.address,obj_address.ZIPCODE); COMMIT; end test_udt_sp; Now How i call this procedure "test_udt_sp" with what type of input parameter of obj_address. Pls help me in this. Thanks in Advance. :confused: Anil
-
How to create and execute of a simple Function with input and output parameters in pl/sql using with c#.netHi, I want to create a simple function(only) with input and output parameters in pl/sql. I want the way of that function execution in c#.net. Pls help. Thanx in advance. :)
-
How to dynamically create many datatables in c#.netThat's OK.But if I don't put the value in configuration then how would i know the count of datatables ???
-
How to dynamically create many datatables in c#.netBrij wrote:
Brij wrote:
I want to create datatabke array, where the array count will be statis and be declared in configuration. like . int iCount=4; for(x=1;x<=icount;x++) { // Here datatable object will be created dynamicall. like dt1,dt2.dt3.... DataTable dt+x =new DataTable(); // I want to add columns to the particular datatable. dt+x.columns.add("NO"); dt+x.columns.add("NAME .. } Thanks.
-
How to dynamically create many datatables in c#.netHow to create many datatable dyanamically in c#.net. Thanks in Advance.
-
Remote Scripting with out using Ajax in c#.netThanxs. At Present i'm not having that link, and i also confirmed with my friends who works on Remote scripting that page events code will be handled in javascript and Remote scripting DLL.
-
Remote Scripting with out using Ajax in c#.netI read one article which says, Remote Scripting can be implemented with or without using Ajax. I didn't mean that without making a trip to the server.I mean that without using Ajax only not server. can anyone help me regarding this ??? Thanks in advance.
-
Remote Scripting with out using Ajax in c#.netHi, Pls tell me any small example about Remote Scripting with out using Ajax in c#.net.Thanks in Advance. :)