Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases 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
 
Old March 27th, 2005, 08:28 AM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to macromotion Send a message via MSN to macromotion
Default 2 TABLES WITH ADO

Hi. Plese, i have some problem with ado and vb. I'm trying to create a relationship between two tables using the method .CreateRelation (with DAO). Plese anyone know to create this, and acess with vb and ado?


tanks.

 
Old May 4th, 2006, 01:59 PM
Registered User
 
Join Date: May 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The CreateRelation method returns a Relation object which must be appended to the DAO.Relations collection with the DAO.Relations.Append method.

Try this:

set r = DB.CreateRelation( name, table, foreigntable, attributes)
DAO.Relations.Append r

~ Shaun





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between ADO and ADO.NET rakeshclose2u ADO.NET 2 April 23rd, 2007 03:57 AM
creating tables within tables in access??? carswelljr Access 3 August 23rd, 2006 01:21 PM
ADO AND ADO.NET royalsurej ADO.NET 1 November 8th, 2004 08:28 AM
ADO - Updating two tables? BradLee31 Pro VB 6 2 May 19th, 2004 05:39 AM
ADO could ADO counot find the specified provider. Rob Collie Classic ASP Databases 2 June 9th, 2003 04:12 AM





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