Adding records - data control, Visual Basic Programming

Assignment Help:

Adding Records:

1. As in the earlier case Set the DatabaseName property as "C:\ex.mdb", now Set the Record Source for the data control as Customer and Set the Record Type to 0.

2. Design a form with 5 text boxes and 2 command buttons new and update.

3. Put the DataSource to Data1 for all the text boxes.

4. Place the DataField property for each and every text box to the various fields of the Customer table.

5. Handle the Click event for new command button and type the handler as shown below:

data1.RecordSource = "Customer"

data1.Refresh

data1.Recordset.AddNew

Now Add New adds a buffer in the memory for a new record.

6. Handle the Click event for the command button, update it and type the handler as shown below:

data1.Recordset("Id") = CInt(text1.Text)

data1.Recordset("name")= text2.Text

data1.Recordset("address")= text3.Text

data1.Recordset("city")= text4.Text

data1.Recordset("state")= text5.Text

data1.Recordset.Update

Now update marks the record into the database.


Related Discussions:- Adding records - data control

Event-driven programming - windows programming, Event-Driven Programming: ...

Event-Driven Programming: The Event-driven programming allows the program to react to various inputs or events.   The action on a graphical component is an event. For il

Dialog boxes in vb, DIALOG BOXES IN VB The two dialog boxes, namely, th...

DIALOG BOXES IN VB The two dialog boxes, namely, the message box and the input box are usually used in the Visual Basic. The message box is used for displaying the messages to

How to, need general help in pseudo code

need general help in pseudo code

Attributes, departmental store attributes

departmental store attributes

Program for elevator application, You are given a console program in both V...

You are given a console program in both VB and C# that uses a class CElevator (ElevatorAppAssign). The main modules are in the assign directory class files. Below is a discus

#simple interest using pseudocode and flowcharts, simple interest using flo...

simple interest using flowchart and psuedocode using the formular s= x + nrx

Program to order a product from inventory, Write a program that permits the...

Write a program that permits the user to order a product from inventory. The user selects the product and enters the quantity. If there is sufficient quantity on hand of the produc

XML with database, write a XML with database with book details( book id, au...

write a XML with database with book details( book id, author ,subject, published year, vendor,price, language )

To calculate rectangle, two sides are given of a sheet e.g 23*36 i want hal...

two sides are given of a sheet e.g 23*36 i want half or 1/2 of this sheet next i want 1/4(one fourth) of this sheet if sheet size is 23*36 next i want 1/8 similary as above

Gdi objects, GDI OBJECTS   The CDC provides 5 versions for the GDI obj...

GDI OBJECTS   The CDC provides 5 versions for the GDI objects. They are fonts, brushes, pens, bitmaps and regions. The Select Object function substitutes the current GDI objec

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd