|
-
Jan 27th, 2009, 08:45 PM
#1
Thread Starter
Member
how to use data control?
im a vb6 user and kinda noob. still trying to learn how to use database here and i have this small book about vb6. ok to make the story short ill paste the instruction i see in the book
1. select and click the visual basic under the microsoft visual studio at the start of the taskbar and programs submenu of the operating system.
2. start a new project na select the standard exe on the given displayed items, then click the open command button. set the caption of the form to Using Data control 1
3. double click two text boxes and a data control in the tool box to add them into the form.
4. widen the data control so that we can see its caption.
5. set the properties for the data control as follows:
DatabaseName: C:\Program Files\Microsoft Visual Studio\VB\BIBILIO.MDB
(im kinda new to databases. when i tried to create a database file in ms access 2007 it becomes .accdb format).
6. set the properties for text box 1:
DataSource: Data1
DataField: Au_ID
7. Set the properties for text box 2:
DataSource: Data1
DataField: Author
8. run the application system by selecting the run menu at the menu bar and click the start item(or click the run icon at the tool bar).
-
Jan 27th, 2009, 10:42 PM
#2
Junior Member
Re: how to use data control?
Bound Controls are evil. Learn ADO instead. There are thousands of examples on the forums
-
Jan 27th, 2009, 11:35 PM
#3
Re: how to use data control?
 Originally Posted by Thomas.Fredrickson
Bound Controls are evil. Learn ADO instead. There are thousands of examples on the forums
Amen. And if you go to the VB FAQ forum you'll find out how to do it.
-
Jan 28th, 2009, 08:18 AM
#4
Re: how to use data control?
Here is an FAQ article that explains why data controls/bound controls are a bad idea, and why your book is not really meant for VB6 (but an earlier version): Why is using bound controls a bad thing?
That is one of several articles in our Database Development FAQs/Tutorials (at the top of the Database Development forum) that you will probably find useful, and it links to another article that shows how to use the recommended alternative to data controls (which is ADO code).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|