ADO

I don't know if I am posting this to the right spot, but boy do I need help! I have to create a VB project using visual studio to do the work. The tables I need to do the work is one part of the problem, they are mdb files. Do i have to have access to open mdb files because I don't have that and i can't find a free trial. Believe it or not this is my smalles problem. I have no idea how to do some of the things the project asks for. I will include the instructions and the file I have to open.

Input: to complete you need existing file CustomerOrder.mdb that has 2 tables: customer and order such that one customer can have many orders (tables are related using CustomerID field). There are also several queries with any example SQL you may need that you can copy and paste from the MDB file into Visual Studio. An example of final app can be seen in file assign3.exe
Scenario: You just started a business to provide party supplies. To run the business, you need a database program so you can enter and view customers and their orders. Further your business plan calls for the work be done in Visual Studio .NET with specific tasks of:
Create a new VB project for a windows application with project name of Assign3", and add the following forms: Begin, Customers, MasterDetail, and StateQuery
Very important: if you do not complete item 10 to perfection then put customerOrder.mdb file in folder "C:\temp" because when you make a database connection it uses a full pathname and I need to put the mdb file in same location so is best if everyone uses same folder.
On Begin form provide a way (menu or buttons) to Exit and show forms for Customer, MasterDetail, StateQuery
On Customers form show a single record display for Customer table that shows data one record at a time (read item below first to see what else to do on customers)
In Customers form only show fields firstname, lastname, birthday, balance, and WantEmail with buttons for navigation that when clicked will move forward and backward through records and save, delete or add a new record. Note for now leave WantEmail as a textbox, but in hard part at end it will become a checkbox, however, checkbox can cause errors if not careful
On MasterDetail form put 2 grids (master-detail display) showing customers and orders such that
top grid shows all customer records but only show fields customerId, firstname, and lastname with column headers of ID, First, Last
bottom grid shows records from order table, but only shows orders that belong to the current customer (master-detail relationship)
in detail grid show all fields from order table
On MasterDetail form
edit customer grid design to have column headers of "ID, First, Last" instead of the default headers
edit detail grid design to make IsPaid field be a checkbox
On MasterDetail form show
sort customer records by lastname and firstname (Hint: use order by clause in the SQL, see QuerySortByName in mdb file)
label with total sum of the 'balance' field for customers (Hint: either loop thru records or execute a new sql command to do a sum like QuerySumBalance in mdb)
On the Begin form put
a control (like a listbox) showing only customers (first name, last name, and balance) whose balance field > 0.(Hint: 1 way is use a data reader with SQL like QueryBalanceNonzero in mdb)
Label showing #records in the Customer table; it should reflect any new entries done on customer form. (Hint: add a connection, data adapter, and dataset and when form loads or after another form updates the DB then use Fill method of adapter to return number of records)
a way to add a new record into customers without showing all the other records. Just use fields lastName firstName and Balance, and validate the data first so name cannot be blank and balance must be positive number (Hint: SQL already in stored query in database called sqlIsnert, so copy & paste from MDB into VS; 1 way to insert is have 3 textboxes for lastName firstName and Balance (not bound to any field) and a button that when clicked will insert a new customer record with the textbox values; insert can be done in code using sqlcommand and assign the parameters of the query to the textbox values then issue .Execute method)
On StateQuery form
provide a control (DropList or Textbox) where user selects a state; make the default value be PA
a control (like Listbox) that shows firstname and lastname but only for customers belonging to state selected above (Hint: 1 way is use SQL with parameter, like QueryState in MDB file, so write code that when state is selected you use DataAdapater.SelectCommand to assign the parameter and re-execute the query command. Alternate ideas are use a filter or make the textbox and combobox be a master-detail)
Hard Part
For database connection: make the default connection string use path "C:\temp" but allow user to browse for the database file to be opened, i.e., use a file dialog to get file path and stuff into connection string at run-time
On Customers form write code before update executes that checks if user is trying to add a new record with a lastname and firstname that already exist in DB and if so ask user if really want to do this and cancel the change if need be. (Hint: you can search for a match several ways per notes on finding a record)
On Master-Detail form make it so user can edit order record and save it; Also if user changes and saves the IsPaid field for an order then you change and update the balance field for the customer, for example if order price =10 and user checks IsPaid then deduct 10 from customer balance field. (Hint: this can be tricky: 1 way is read notes on column_changing, another harder way is before Update method executes for order table check the original and proposed values for Ispaid in each row and if changed then find the customer with that ID in customer table and change the balance )
On the Customers form make the control bound to field WantEmail be a checkbox

I know this is a long post, but I am stuck and I don't know what to do. Can anyone help?
-Erin
0
erinsue
4/1/2004 11:54:10 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

4 Replies
600 Views

Similar Articles

[PageSpeed] 4

Quite frankly, I just don't have the time to take you through all the points in your post.    Why don't you tell us what part you are stuck on, and focus on that ONE part, and go from there.  I would also suggest checking out sites like aspalliance.com, 4guysfromrolla.com, dotnetjunkies.com and of course msdn.microsoft.com for samples on how to do some of these things.  As far as the mdb file, you don't need access, you just need to have rights to the directory it's on.
Eric Landes

MADNUG President http://www.madnug.net
Crystal Alliance Editor
Blog http://aspadvice.com/blogs/elandes
Microsoft MVP
0
ericlandes
4/1/2004 12:29:06 PM
Okay the first problem I am having is how do you open mdb files in vs.net?
0
erinsue
4/1/2004 12:37:30 PM
I don't understand what you mean by rights.  I was given the mdb file to download but I can't open it because it says i don't have the right program.
0
erinsue
4/1/2004 12:53:04 PM
Do a search on google for thing like "Examples ASP.NET ACCESS".  I cam up with this link which may be helpful.  You probably can't open the mdb file directly in VS.NET, but you can open it with code.  Look at these example, and the asp.net examples for Oledb on msdn.microsoft.com and you can find good working examples that should help you get started.  Also there are samples with web matrix found on this site as well.
Eric Landes

MADNUG President http://www.madnug.net
Crystal Alliance Editor
Blog http://aspadvice.com/blogs/elandes
Microsoft MVP
0
ericlandes
4/1/2004 1:26:21 PM
Reply:

Similar Artilces:

How do the different data presentation controls equate in ADO.net?
How does Visual Studio create ado.net equivalents of the datagrid's and gridview's columns and rows?  I am assuming they make a DataRow for each of the rows.  Am I on the right track with this?Is the table created by gridview basically a dataset from ADO.net?  Can anyone offer any guidance with this?Thanks to everyone that has ever helped me with any posts. Hi newbie2C#, The row in datagrid is called DataGridItem and in gridview is called GridViewRow. They are all inherits TableRow Class. DataRow is only one kind of row in GridView control. There are many other t...

Does .NET map calls for ADO to ADO.NET?
Hello,We are trying to troubleshoot some DB problems from COM objects that call ADO. I heard that when ADO is loaded inside of a COM object by a .NET app, that .NET intercepts the call and re-maps those calls over to ADO.NET. This seems untrue to me, given the nature of ADO.NET being a totally separate technology.Does anyone know for sure whether this does or does not occur?The problem we are seeing is actually almost identical in symptoms to this:http://support.microsoft.com/default.aspx/kb/230101"FIX: Data Queries Sporadically Return Empty Recordsets" Literally, this is what...

ADO in VB6 vs ADO.NET in VB.NET
I am writing a database interface and I would like to know whether a VB6 interface using ADO or a VB.NET interface using ADO.NET would be faster in terms of just performing database operations. Is there an explanation for this, and what is the magnitude of the difference? Thanks in advance!...

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

ADO to ADO.NET
I'm an ASP programmer (VBScript) moving on to ASP.NET. So far I'm using:Microsoft Visual Studio 2003ASP.NET with C#I'm working on converting my code over to C#, from VBScript. Now, here is my code in VBScript (modified to better understand it, this is a edited ugly version):Function ExecuteSQL(sqlStatement)    ConnDriver = "Provider=SQLOLEDB; Data Source = " & dbIP & "; Initial Catalog = " & dbName & "; User Id = " & dbUser & "; Password=" & dbPassword     Set connTemp = Server.CreateObject("ADODB.Connection")    c...

ADO not ADO.NET
Hi, I have to connect to a db using adodb (which i select from the references). I have to retrieve the car models from the database and bind them to a listbox. I am not sure how to proceed and I can't find any articles on ADO with .net and data binding. Here is the code that i tried but it only retrieves the car model for the specified id. If I delete the id it doesn't work. Also it writes the car model in the listbox vertically such as: B M W CODE: Imports System.Data Imports ADODB Imports System.Data.OleDb Public Class listboxADO Inherits System.Web.UI...

SqlDataAdapter and ADO.NET Controls
I am using VS 2005 for building a web based project.  Am stuck with the database connection.  I am trying to use the ADO.NET controls but they are not available on the toolbar.  When i have even add the controls from "choose toolbar items" but they appear as a transparent controls.  Can't drag them from the toolbar on to the Web form.  These information i get when i try to add them from "Choose tollbar item" " Namespace: system.data.sqlclient; assembly: system.data.(2.0.0.0) but this: directory : Global Assembly Cache. What to do? Ho...

Ado.Net Data Controls.
Hello to all, I am learning ASP.NET 2.0. To access database it has a nice controll called DataSource.But I fell many restriction on accesing data with this kind of source. Like I can not access data from more than one table, Is there any way to do so ??? Second thing I do not get data controls that were awailable in previous version of ASP.NET.They are not listed in Tool Box. Any one can tell me how to get them? mistry_bhavin wrote:I do not get data controls that were awailable in previous version of ASP.NET.They are not listed in Tool Box. Any one can tell me how to get them? Hi, the...

ADO.NET Visual Studio 2005 Install Help!, ADO.NET Missing
 Hi everyoneI have a real annoying problem, I have installed Visual Studio 2005 with C#,C++,Web Applications.. Before I installed VS2005 I made sure I had all the .Net Download from 1.1 to 3.5 with the Service Packs, I also Installed a VS2005 Patch that was around 430mb. I have tried this on 3 computers, two of XP and 1 vista.I need ADO.NET Functionality, When I choose to create a Web Application in C#, I require the ADO.NET Entity Data Model as it will allow for a graphical interaction with a SQL db. However When I Choose Add New Item in Solution explorer there is no ENtity Mode...

Data Controls Vs. ADO.Net
Background: I'm making the transition from PHP to ASP.Net, and I am using Visual Studio 2005.My question is: Are there general guidelines for when to use the Data Controls over the ADO.Net classes, and vice versa?I'm used to doing everything manually, so I'm leaning towards just using ADO.Net. My gut reaction is that cookie-cutter approaches like the data controls will be limiting with more advanced applications. Do you typically use one or the other, or do you typically find a balance and end up using some of each?Let me know what you think. Thanks!  The 2 main data source controls, ...

How to use ADO.Net with Formview control?
 Hi everyone.  I am using ADO.Net(code) to Insert,update,delete,select record into the database.  i have a user input form and formview in my project.   When i enter user info and click insert button the data in the input form gets saved in the database as well as the form gets redireted to  formview.aspx.  But i m not able to extract the values from the database and show it in the formview.  i know i can do this using SqlDataSource. But i want to use code to bind the record to the formview instead of using sqldatasource or objectdatasource. any s...

ADO.Net vs Data bound controls.
What are the pros and cons of using ADO.net vs Data bound controls? I know data bound controls might be resource heavy, but alot of tutorials are pushing bound controls (SQLDataSource control and ObjectDataSource Control)I would love to hear anyones opinions and experiences.ThanksMike. Hi Mike, The reason why many tutorials use Data controls is because many times the articles want save time and focus on other core concepts and Data controls allow us to cut down on the data base related code so that the author can focus on the main topic. Another reason is that Data controls are perfect fo...

ADO to ADO.NET help
Hi, I am converting application ASP to ASP.NET.What is the equivalent code in ADO.NET. For each F in RS.Fields FieldName = F.Name Next Thanks, Nate If it is forward only, then you can use datareader for more info on this, check below link Datareader on MSDN Hope it helps!Sreedharhttp://www.w3coder.orgweblog http://weblogs.asp.net/skoganti...

Opinions about ADO and ADO.NET
Hi everyone again!!! I´m used to develope applications with ADO, but now with .NET to develope a Web Application and a Mobile Web Application, I don't know if I have to use ADO.NET or continue using ADO. What Disadvantages has ADO to built Mobile Applications? In ADO I use ACCESS to create the .mdb files, Can I use .mdb files with ADO.NET? Thanks for all!! Go to ADO.NET NOW ! don't be late and you can use access in ado.net ADO.NET VB.NET/C#/ASP.NET/Oracle Designer 6i DotNet4Arab.com Building a custom web control(vb.net) Well, Thanks for your opinion, but I have...

Converting ADO to ADO.NET
Hi, I am trying to convert this code from ADO to ADO.NET I am very new to ADO.NET and am a bit confused on how I would convert this. Basically what I am trying to do is capture the name of the fields of a table to populate a dropdownlistbox. The table name will change every time the program is run. This is not a problem and I can code for that. Here is what I have in ADO (I have tried the wizard but it did not change the code) Dim tblFields As Object Dim myRst As New ADODB.Recordset Dim myField As ADODB.Field Dim myCnn As New ADODB.C...

Web resources about - ADO - asp.net.presentation-controls

ADO Den Haag - Wikipedia, the free encyclopedia
[ˈɑ.ləs doːr ˈu.fə.nɪŋ dɛn ˈɦaːχ] ), commonly known by the abbreviated name ADO Den Haag [ˈaː.do dɛn ˈɦaːχ] , is a Dutch football club from the ...

David Tennant and Catherine Tate star in Much Ado About Nothing - Available now from Digital Theatre ...
Watch online or download the full show to your desktop now at http://www.digitaltheatre.com. David Tennant and Catherine Tate appear together ...

Joss Whedon Much Ado About Nothing Twitter
Joss Whedon delivers a Shakespearean trailer, Twitter joy and cannibalism all in one day

Much Ado About Nothing
... modern-day reading of Shakespeare's romantic comedy, filmed in his own home with a cast comprised of alumni from his TV shows. Rate Much Ado ...

Canberra Repertory Society gives Much Ado about Nothing a 1920s twist
Shakespeare's reworked comedy transcends the ages with ease.

CBC Digital Archives - Much Ado About Christmas: Toys, Traditions & Fun - Lighthouse Santa
Relive Canada's history through CBC Radio and Television. This free site features thousands of radio and television clips from the archives of ...

Much Ado About Dacheng Dentons
Dentons’ loosely affiliated verein style likely played a large role in capturing the largest Chinese law firm.

Much Ado About...
Kerfuffle: A social imbroglio or brouhaha.

Much Ado About Smart Tags
Microsoft's proprietary Smart Tags: Boon or bane? Kaminski digs deep beneath the hype and paranoia in an extensive assessment of what Microsoft ...

A Guantanamo Tour: 'Much Ado About Nothing'?
In vivid detail, Jason Leopold describes daily life for both the detainees and guards at the facility.

Resources last updated: 12/26/2015 2:56:11 PM