databases in c#

Discussion in 'C#' started by karthikcsharp, May 12, 2009.

  1. karthikcsharp

    karthikcsharp New Member

    Joined:
    May 12, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    hii experts of the forum:


    i am a beginner to c#,now i m looking for getting into databases in c#.i want to know how to add,insert,delete,update fields in database in c# via windows forms.

    could u anyone suggest how to do this,

    thnk you!!!
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    You'll need to read the c# documentation of course.

    .Net implements data access through a data access layer for which the intent is to abstract the details of individual databases away so you can use the same code and just replace the database - in reality it's not that clear cut and you will need database specific code. Commonly this is because Microsoft implement datatypes that match SQL Server datatypes well but are not so hot on non-SQLServer datatypes. For example the integer types in SQL Server are based on byte sizes whereas Oracle numbers are based on natural numbers, so SQL Server handles datatypes with a range of 0-255, 0-65535 etc well, but Oracle works with numbers with ranges of 0-99, 0-9999 etc. Plus how different databases handle large objects (LOBs) is not standardised.

    So at some point you will need to decide which database to major on, and it will be useful to have some knowledge of other databases too.
     
  3. karthikcsharp

    karthikcsharp New Member

    Joined:
    May 12, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    hii xpi0t0s:-

    thanks for the reply,

    i m comfort with sqlserver2005 and litlle bit with oracle9i.

    if i choose sqlserver2005,then

    what is the normal procedure to do those data manipulation operations.

    thnk you forum!!!!
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Well, if it was Oracle you'd add a reference to your project that includes Oracle.DataAccess, include the ODP.Net namespaces, then just use the functionality in your code.
    You could also have a look at the provided examples, for example in a 10.2.0 machine I have handy, they're in C:\oracle\product\10.2.0\db_1\odp.net\samples
     
  5. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice