Results 1 to 4 of 4

Thread: Insert into Oracle Database

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2008
    Posts
    474

    Insert into Oracle Database

    Code:
    protected void Page_Load(object sender, EventArgs e)
        {
            int Roll = 1;
            string sName = " powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers togather information they care about and customize the appearance of Web pages. For examplev11harePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For examplevharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For examplevvharePoint allows information workers to create powerful pers  onalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather informa  tion they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined Web Part Components. Web Parts are components that enable non programmers to gather information they care about and customize the appearance of Web pages. For exampleharePoint allows information workers to create powerful personalized interfaces by simply dragging and dropping pre-defined W";
    
            string sQuery = "INSERT INTO TBL_STUDENT(ROLL,NAME1) VALUES (" + Roll + " ,'" + sName + "')";
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }
            OracleCommand cmd = new OracleCommand(sQuery,con);
            cmd.ExecuteNonQuery();
            
    
        }
    DataType of NAME1 column is VARCHAR2(4000 CHAR).
    1) Can somebody tell me in Oracle for VARCHAR2 ,we have two datatypes CHAR & BYTE. Wats the diffence between Two.
    If we choose 4000 CHAR,Maximum number of characters that can be insrted in database is 4000 chracters.SUppose I choose the 20 Byte,how many chracters can be insrted in database?
    2) If I want to insert more than 4000 characters,Which DataType to USE??

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Insert into Oracle Database

    Hey,

    Again, this question doesn't really belong in the ASP.Net forum, as this is very much a database (in your case Oracle) question.

    I am going to ask that this be moved to the appropriate forum.

    Gary

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Insert into Oracle Database

    Thread moved to 'Database Development' forum

    (thanks for letting us know Gary )

  4. #4
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: Insert into Oracle Database

    The difference between byte and char length only matters for character sets that use more than 1 byte per character, e.g. for WE8ISO8859P1 they are the same (1 byte = 1 char). For multi-byte character sets, since varchar2 max length in tables is 4000 bytes you can end up with 2000 (2 byte per char) or less characters (more than 2 bytes per character).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width