databases in c#

karthikcsharp's Avatar
Newbie 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!!!
0
xpi0t0s's Avatar, Join Date: Aug 2004
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.
0
karthikcsharp's Avatar
Newbie 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!!!!
0
xpi0t0s's Avatar, Join Date: Aug 2004
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
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Also worth a look is http://www.oracle.com/technology/tech/dotnet/index.html