Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Relationship in db embedded in asp page

Status
Not open for further replies.

Charlix

Programmer
Nov 19, 2002
85
US
Hi,
I get the following error message when I try to remove a one to many relationship in my database programatically:

*******
object required '[string: "C:\Caps1\CapsDb1.mdb"]'
*******

This is the code I am using on my asp page"

*******************
Set db = "caps1\capsDB1.mdb"

set rel = db.CreateRelation("321", "Multi Table", "Records Table")
rel.attributes = dbRelationDontEnforce
Set fld = rel.CreateField("MID")
fld.ForeignName = "MID"
rel.Fields.Append fld
db.Relations.Append rel

db.Relations.Update
*********************

What am I doing wrong?

Thanks,

Charlix
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top