473,399 Members | 3,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 1335

"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
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...
0
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...
3
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...
8
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...
13
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.