Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   databases in c# (http://www.go4expert.com/forums/databases-c-sharp-t17476/)

karthikcsharp 12May2009 11:09

databases in c#
 
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!!!

xpi0t0s 12May2009 13:29

Re: databases in c#
 
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.

karthikcsharp 12May2009 17:34

databases in c#
 
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!!!!

xpi0t0s 12May2009 20:09

Re: databases in c#
 
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

xpi0t0s 12May2009 20:10

Re: databases in c#
 
Also worth a look is http://www.oracle.com/technology/tech/dotnet/index.html


All times are GMT +5.5. The time now is 00:18.