[AccessD] Linking to various dbs through DAO /Access2k

Charlotte Foust cfoust at infostatsystems.com
Fri Apr 11 10:24:28 CDT 2003


You don't need to set an attached attribute if you create a link.
Access already knows it's attached.  I don't understand what you're
doing.  Is this the same BE you were already using or a different one?
Usually dropping and recreating a link is because you've changed back
ends but it sounds like you're doing something else.
 
Charlotte Foust
 
-----Original Message-----
From: Don Elliker [mailto:delliker at hotmail.com] 
Sent: Friday, April 11, 2003 4:53 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Linking to various dbs through DAO /Access2k



	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.

	_d
	
	

	>From: "Charlotte Foust" 
	>Reply-To: accessd at databaseadvisors.com 
	>To: 
	>Subject: RE: [AccessD] Linking to various dbs through DAO
/Access2k 
	>Date: Thu, 10 Apr 2003 14:21:31 -0700 
	> 
	>All you have to do is create the table and set its connect
string and 
	>sourcetable name, then append it to the TableDefs collection.
You don't 
	>set attributes. 
	> 
	>Charlotte Foust 
	> 
	> -----Original Message----- 
	> From: Don Elliker [mailto:delliker at hotmail.com] 
	> Sent: Thursday, April 10, 2003 9:04 AM 
	> To: accessd at databaseadvisors.com 
	> Subject: [AccessD] Linking to various dbs through DAO
/Access2k 
	> 
	> 
	> 
	> I am trying to get linked to a selected database through code.
I 
	>get a failure on the append. The very informative 3251
"Operation is not 
	>supported for this type of object". I need to delete all the
attached 
	>tables and relink to new ones. 
	> 
	> I am doing this: db_Be is the new database I want to link to. 
	>dbcur is the front end I am running code from. 
	> 
	> Thanks, and How's everybody been?(don't answer that you'll
kill 
	>my hotmail account) 
	> 
	> _D 
	> 
	> For intI = 0 To db_BE.TableDefs.Count - 1 
	> Set TdfBE = db_BE.TableDefs(intI) 
	> SysCmd acSysCmdUpdateMeter, intI 
	> If Not TdfBE.Name Like "msys*" Then 
	> Set tdfNew = dbCur.CreateTableDef() 
	> With tdfNew 
	> .Name = "newtable" & intI 
	> '.Attribu! tes = dbAttachedTable 
	> .SourceTableName = TdfBE.Name 
	> .Connect = "MS Access;DATABASE=" & 
	>strDBName 
	> End With 
	> 'dbCur.TableDefs.Append (tdfNew) 
	> 
	> dbCur.TableDefs.Append (tdfNew) 
	> ! End If 
	> Next intI 
	> 
	> 
	> 
	> 
	> _____ 
	> 
	> Tired of spam? Get advanced junk mail protection 
	> with MSN 8. 
	> 
	>_______________________________________________ 
	>AccessD mailing list 
	>AccessD at databaseadvisors.com 
	>http://databaseadvisors.com/mailman/listinfo/accessd 
	>Website: http://www.databaseadvisors.com 

  _____  

	Tired of spam? Get advanced junk mail protection
<http://g.msn.com/8HMEENUS/2734>  with MSN 8. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030411/b0514842/attachment-0001.html>


More information about the AccessD mailing list