Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 16th, 2006, 07:52 PM
Registered User
 
Join Date: Jul 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Write to a database

i need help on how my program in vb6 can write to my dbase.in my vb6, i have a frmAdd where i add in some records, now these should automatically appear in my dbase, looks like it doesn't, or it takes some time for the added record to appear in my AddRecord table.
any procedure on how vb6 programs write to the dbase?(still a beginner in vb6 myself)

  #2 (permalink)  
Old July 17th, 2006, 08:51 AM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well. Is this a program that you have written yourself? or is it mostly code you have copied from somewhere??? Records don't automatically do anything - you have to write code to make stuff happen.

What kind of database do you have? Do you mean to say you are working with DBase? or is that just an abbreviation for database? Are you using Access? or Sql Server? or Oracle? Or?

Please show us a little of your database access code if you would like some help.

Generally, in VB6 you will use ADODB for your data access code. This provides a more or less object oriented way to access databases. ADODB is relatively straight forward, and I assume you must already be using it as this is by far the most common methodology for database access in VB6.

So... it is time for you to be a little more specific in your question, and give us some details about what you are trying to do.

Woody Z http://www.learntoprogramnow.com
  #3 (permalink)  
Old July 18th, 2006, 07:13 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Location: , , Canada.
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here are a couple VB6 specific links that may be of interest:

Database Programming: http://www.vbexplorer.com/VBExplorer...etutorials.asp
Setup and Use Data Access Objects (DAO): http://www.woodger.ca/vbsamp.htm
Working with a database: http://www.profsr.com/vb/vbless09.htm

- Adam Kahtava [http://adam.kahtava.com]
  #4 (permalink)  
Old August 24th, 2006, 12:11 AM
Authorized User
 
Join Date: Aug 2006
Location: san fernando, la union, , Philippines.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

your frmAdd must have a procedure i.e. Private Sub Add_Records(data passed to table)
Note: data passed must take the same order as the data table columns. data types must conform to the data type defined in each destination column of the data table. make sure that the connection to the database has been established prior to sending the data items to the target table in the database.



Similar Threads
Thread Thread Starter Forum Replies Last Post
its urgent,write permission to database(mdb). shanwaj ASP.NET 1.0 and 1.1 Basics 2 January 10th, 2008 12:40 PM
Write to DataBase HELP!!! reidcor Javascript 3 January 19th, 2005 02:58 PM
Database Write and Email inquiringminds BOOK: Beginning ASP 3.0 9 September 21st, 2004 06:33 AM
How to read/write Access Database jmmendes Access VBA 0 November 18th, 2003 01:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.