<html><div style='background-color:'><DIV>
<P>ok-tried that (it's commented) you can set the attributes if you want btw. still fails on the append. I have some thoughts I will try today and will advise. There's a cryptic note in the help about the tables being appended when the Be is opened. I am doing a delete of tabledefs prior to the attempt to append , that may be causing me a problem.</P>
<P>_d<BR><BR></P></DIV>
<DIV></DIV>
<DIV></DIV>>From: "Charlotte Foust" <CFOUST@INFOSTATSYSTEMS.COM>
<DIV></DIV>>Reply-To: accessd@databaseadvisors.com
<DIV></DIV>>To: <ACCESSD@DATABASEADVISORS.COM>
<DIV></DIV>>Subject: RE: [AccessD] Linking to various dbs through DAO /Access2k
<DIV></DIV>>Date: Thu, 10 Apr 2003 14:21:31 -0700
<DIV></DIV>>
<DIV></DIV>>All you have to do is create the table and set its connect string and
<DIV></DIV>>sourcetable name, then append it to the TableDefs collection. You don't
<DIV></DIV>>set attributes.
<DIV></DIV>>
<DIV></DIV>>Charlotte Foust
<DIV></DIV>>
<DIV></DIV>> -----Original Message-----
<DIV></DIV>> From: Don Elliker [mailto:delliker@hotmail.com]
<DIV></DIV>> Sent: Thursday, April 10, 2003 9:04 AM
<DIV></DIV>> To: accessd@databaseadvisors.com
<DIV></DIV>> Subject: [AccessD] Linking to various dbs through DAO /Access2k
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> I am trying to get linked to a selected database through code. I
<DIV></DIV>>get a failure on the append. The very informative 3251 "Operation is not
<DIV></DIV>>supported for this type of object". I need to delete all the attached
<DIV></DIV>>tables and relink to new ones.
<DIV></DIV>>
<DIV></DIV>> I am doing this: db_Be is the new database I want to link to.
<DIV></DIV>>dbcur is the front end I am running code from.
<DIV></DIV>>
<DIV></DIV>> Thanks, and How's everybody been?(don't answer that you'll kill
<DIV></DIV>>my hotmail account)
<DIV></DIV>>
<DIV></DIV>> _D
<DIV></DIV>>
<DIV></DIV>> For intI = 0 To db_BE.TableDefs.Count - 1
<DIV></DIV>> Set TdfBE = db_BE.TableDefs(intI)
<DIV></DIV>> SysCmd acSysCmdUpdateMeter, intI
<DIV></DIV>> If Not TdfBE.Name Like "msys*" Then
<DIV></DIV>> Set tdfNew = dbCur.CreateTableDef()
<DIV></DIV>> With tdfNew
<DIV></DIV>> .Name = "newtable" & intI
<DIV></DIV>> '.Attribu! tes = dbAttachedTable
<DIV></DIV>> .SourceTableName = TdfBE.Name
<DIV></DIV>> .Connect = "MS Access;DATABASE=" &
<DIV></DIV>>strDBName
<DIV></DIV>> End With
<DIV></DIV>> 'dbCur.TableDefs.Append (tdfNew)
<DIV></DIV>>
<DIV></DIV>> dbCur.TableDefs.Append (tdfNew)
<DIV></DIV>> ! End If
<DIV></DIV>> Next intI
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>> _____
<DIV></DIV>>
<DIV></DIV>> Tired of spam? Get advanced junk mail protection
<DIV></DIV>><HTTP: 2734 8HMJENUS g.msn.com> with MSN 8.
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV></div><br clear=all><hr>Tired of spam? Get <a href="http://g.msn.com/8HMEENUS/2734">advanced junk mail protection</a> with MSN 8.</html>