Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 27th, 2005, 08:28 AM
Registered User
 
Join Date: Dec 2004
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old May 4th, 2006, 02:59 PM
Registered User
 
Join Date: May 2006
Location: Bremerton, WA, USA.
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
Reply With Quote
Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between ADO and ADO.NET rakeshclose2u ADO.NET 2 April 23rd, 2007 04:57 AM
creating tables within tables in access??? carswelljr Access 3 August 23rd, 2006 02: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 06:39 AM
ADO could ADO counot find the specified provider. Rob Collie Classic ASP Databases 2 June 9th, 2003 05:12 AM



All times are GMT -4. The time now is 03:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.