Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 28-02-2007, 11:45 PM   #1 (permalink)
In The Zone
 
Sridhar_Rao's Avatar
 
Join Date: Feb 2007
Posts: 353
Red face visual basic database

I posted this question few days ago in tutorials, nobody replied. so, I am posting this question again in this forum.

I am my own teacher. I download online tutorials and learn on my own. Although I have dozens of them on use ADO controls for Databases, I have not been able to understand it. My knowledge is limited to programming in foxpro2.6. Can anyone help me with the following:
1. Create a database (*.mdb) either through access or programtically in VB6
2. Open the said database table
3. Append the table from on screen controls-repeat for another few records
4. Edit the contents, replace the valuue
5. Save the table & exit

I would wish to inform that I am a complete beginer and learning on my own. If the codes were given line by line, it would be really helpful.
__________________
Want to study M.Sc in any medical subjects? Read this www.microrao.com/msc.htm
Microx, a diagnostic microbiology laboratory software application www.labmicrox.com
Sridhar_Rao is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 03-03-2007, 03:13 PM   #2 (permalink)
Human Spambot
 
tuxfan's Avatar
 
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
Default Re: visual basic database

I have made many such softwares but few years ago. I stopped writing softwares and shifted to web. But I think it is really difficult to spoon feed you the steps, especially when physically you are not present with me

Any idea on how I can help you?
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
tuxfan is offline  
Old 04-03-2007, 09:13 AM   #3 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2007
Posts: 31
Default Re: visual basic database

huuuummmmm.....
try downloading some projects from
www.a1vbcode.com
try atleast 100 , then u will get a fair idea..
also practice as much as u can...
__________________
U r a teen ???
www.allteenforums.com
bugmenot is offline  
Old 04-03-2007, 08:14 PM   #4 (permalink)
Apprentice
 
Join Date: Jan 2006
Posts: 82
Default Re: visual basic database

In this article we'll create a simple database in Microsoft Access and then create a user interface in Visual Basic 6.0.

Putting everything together should be relatively easy because we'll use Adodc Componenet to make the connection to our Database.
We'll then add a DataEnvironment and DataReport and within minutes we'll be able to export our DataReport to a Microsoft Word Document. (.doc)

Creating our Database in Microsoft Access:

Create a blank database in Microsoft Access and name the database: DataReport. Now create a table by going to: Create Table in Design View and enter the Field Name(s) and Data Type(s) as shown in the image below. Save the table and name it: Customers.



Now, open the Customers Table and fill in the information you see in the image below.



Now let's move on to creating a user interface in Visual Basic 6.0. We're almost there. We"ll just place a few controls and in a short time we'll be able to Export our DataReport to a Microsoft Word. (.doc)

Creating our User Interface in Visual Basic 6.0

Open Visual Basic and choose: Standard EXE. Add a Adodc Component by going to Projects, Components and choose Microsoft ADO Data Control. Click Apply and then Close. You will now have a this Component in your ToolBox. Add 9 TextBox(s) named: Text1, Text2, Text3 and so on. Now add 9 Labels named: Label1, Label2, Label3 and so on. Change the Caption Property for each Label as shown in the image below. Add the Adodc Control from our ToolBox named: ADODC1. Add a CommandButton named: Command1. Change the Caption of the CommandButton1 to View Report. Now we just need to make the connection.

If you're wanting to Export a DataReport to Microsoft Word then I would guess that you already know the steps that need to be taken. This expanation will help those who are doing this for the first time or maybe have forgotten a step or two.

Right click ADODC1 control that we'd placed on Form1 and right click ADODC Properties. Choose: Use Connection String and left click Build. When prompted Choose Microsoft Jet 4.0 OLE DB Provider and click Next. Now, click the button to the right where you see 1. Select or enter a database name. Go to the location where you'd saved your database and double click. Check or Test your connection. If everything is on track you'll see a messagebox with the message "Test Connection Succeeded"-- Press OK to close the message and then press OK again.
Now, go to where you see RecordSource and left click. For the CommandType choose 2 - adCmdTable. Now go to Table or Stored Procedure Name and choose Customers (or whatever you'd named your Table) Now just click Apply and then click OK.

Now we'll set the DataSorce and DataField Properties to each Textbox that we'd place onto our Form1 earlier.

Click Text1 and then go to the Properties Window. Set the DataSource Property to ADODC1 and the DataField Property to CustID. (Note: All of the remaining TextBox(s) DataSource Properties will be set to ADODC1) Now go to Text2 and Set the DataSource Property. Set the DataField Property to LastName. Go to Text3 and Set the DataSource Property. Set the DataField Property to FirstName. Set the DataSource and DataField Properties for the remaining TextBox(s).

__________________
Want cool hosting click here..

http://www.servage.net/?coupon=cust12588
dharmeshhtailor is offline  
Old 04-03-2007, 09:48 PM   #5 (permalink)
Right Off the Assembly Line
 
Join Date: Feb 2007
Posts: 31
Default Re: visual basic database

using codeing is more easier than these ADODC's
also u get more flexibility..
__________________
U r a teen ???
www.allteenforums.com
bugmenot is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 09:04 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2