1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

databases in c#

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

  1. karthikcsharp

    karthikcsharp New Member

    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

    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

    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

    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

Share This Page