DB Sample Code Request

T

Tony

Would anyone be able to help me with the most bare-boned as possible
code to connect to an oracle database and do a sql query and load the
data into a an array?

I have Oracle 9i client installed and expect it to be installed on any
machine running the app. (Along with win2k or XP Pro)

Trying to self-learn C# and an example of the above would help me
re-write a VB6 app I did in the past to C# as a learning tool :)

Thanks for any assistance. :)

Tony!
 
M

Mohamoss

hi tony
you can find exactly what you need on this link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbtskcreatingconnectiontooracledatabase.asp

just a quick discription of what you will be doind , you need an
OleDbConnection object to connect to an oracle 9i database
then you need an OleDbDataAdabter to get data from your database . if you
are going to use the connected modle then you would need a datareader and
use it get the data after execting an OleDbCommand on the database .
however , you can use the disconnected modle and use the adapter to fill a
dataset , then you would do all the modification on the dataset and later
update thet database , the MSDN artical would explain more
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

I'd appreciate your opinion(s) 3
oracle with visual studio 2005 1
VS2005 C# Web Newbie Question 10
Asp.net/vb and Oracle 1
Code generator ideas 1
T-SQL Break Out 4
Linking to Oracle 2
New to C# 15

Top