473,526 Members | 2,850 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New C# programmer questions

So I have been working pretty hard on the C# coding, and I am doing
pretty well so far at it. I started out with simple console apps and
eventually made a little windows application that took your salary &
hours per week and could calculate your monthly, weekly & hourly pay
with or without taxes taken out. Pretty nifty, but at this point I
want to get into pulling data out of databases for my next test
project. I have tried surfing all over the net and I can't seem to
find any updated documentation that makes sense to me as a new
programmer, of how to add and access/change data from a database.
Some xtra information for those willing to help is below, thanks
again :)

Developing in: Visual Studio 2008
Database: Microsoft Access Database
Database Location: C:\customer.mdb
Password Protected DB = No
Table Name: Info
Table Primary Key: CID
Table Field1: FirstName
Fields on Program: txtCustomerName

I wanna be able to connected, pull up customer by the name typed in,
and later be able to change that information. I hope this helps let
me know if you need any more information, thanks!
Jul 7 '08 #1
2 1341

"CSharp-Jay" wrote:
So I have been working pretty hard on the C# coding, and I am doing
pretty well so far at it. I started out with simple console apps and
eventually made a little windows application that took your salary &
hours per week and could calculate your monthly, weekly & hourly pay
with or without taxes taken out. Pretty nifty, but at this point I
want to get into pulling data out of databases for my next test
project. I have tried surfing all over the net and I can't seem to
find any updated documentation that makes sense to me as a new
programmer, of how to add and access/change data from a database.
Some xtra information for those willing to help is below, thanks
again :)

Developing in: Visual Studio 2008
Database: Microsoft Access Database
Database Location: C:\customer.mdb
Password Protected DB = No
Table Name: Info
Table Primary Key: CID
Table Field1: FirstName
Fields on Program: txtCustomerName

I wanna be able to connected, pull up customer by the name typed in,
and later be able to change that information. I hope this helps let
me know if you need any more information, thanks!
Hi Jay,

What you need is to use an OldDbCommand, either directly or wrapped in an
OleDbDataAdapter. To be able to use OleDbCommand it needs an OleDbConnection
and a command string, and the OleDbConnection needs a connection string
(www.connectionstrings.com may help you create this).

This tutorial may get you started with the basic understanding of ADO.Net

http://www.csharp-station.com/Tutori.../Lesson01.aspx

Whereas this article demonstrates using OleDb to read Access databases.

http://www.codeproject.com/KB/databa...sInCSharp.aspx

If you find little information on OleDb classes try googling SqlCommand etc
as the usage is identical in most cases.

--
Happy Coding!
Morten Wennevik [C# MVP]

Jul 7 '08 #2
Hello,

I would also recommend you to have a look at the ORM concept as well as LINQ
2 SQL and ADO .NET Entity Framework.

Kind regards,
Andrei Varanovich [C# MVP]
So I have been working pretty hard on the C# coding, and I am doing
pretty well so far at it. I started out with simple console apps and
eventually made a little windows application that took your salary &
hours per week and could calculate your monthly, weekly & hourly pay
with or without taxes taken out. Pretty nifty, but at this point I
want to get into pulling data out of databases for my next test
project. I have tried surfing all over the net and I can't seem to
find any updated documentation that makes sense to me as a new
programmer, of how to add and access/change data from a database. Some
xtra information for those willing to help is below, thanks again :)

Developing in: Visual Studio 2008
Database: Microsoft Access Database
Database Location: C:\customer.mdb
Password Protected DB = No
Table Name: Info
Table Primary Key: CID
Table Field1: FirstName
Fields on Program: txtCustomerName
I wanna be able to connected, pull up customer by the name typed in,
and later be able to change that information. I hope this helps let
me know if you need any more information, thanks!

Jul 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1845
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.win64 This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.win64 as an unmoderated world-wide Usenet newsgroup dedicated to the discussion of Microsoft Windows 64 bit programming. This is not a Call for Votes (CFV); you cannot vote...
0
1572
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.win64 This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.win64 as an unmoderated world-wide Usenet newsgroup dedicated to the discussion of Microsoft Windows 64-bit programming. This is not a Call for Votes (CFV); you cannot vote...
3
3226
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.64bit This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.64bit as an unmoderated world-wide Usenet newsgroup dedicated to the discussion of Microsoft Windows 64-bit programming. This is not a Call for Votes (CFV); you cannot vote...
8
1589
by: V.Ch. | last post by:
In near future I can face a prospect of writing some stuff in C. Being a C++ programmer, I've got practically no experience in C. I'd be obliged if someone could answer the following questions (from specific to more general): 1. Having looked though some C sources I was horrified by the number of macros. E.g., what could be the purpose of...
13
2018
by: aum | last post by:
Hi, I'm a Python programmer, just starting to get into javascript. On reading some of the js guides, and not liking any of the OO usage patterns I saw, I've cooked up something which python folks might find to taste. Here's the code - first the 'engine', then some code demonstrating the usage patterns. For me (and maybe for some of...
0
7329
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7651
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4819
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
1702
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
890
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
549
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.