I use a method like the following to deal with the state of SAttached 
tables:

{begin code - watch for email reader wrap}

*(Use ODBC DSN Less to connect to Bar Db)
SET VAR %1 TEXT

SWITCH (.%1)
  CASE 'Connect'
    SCONNECT ';driver={R:Base 7.0 Database Driver 
(*.rb1)};dbq=F:\rb7\Bar\ExistBar\Bar.rb1;'
    SATTACH vendlst
    SATTACH vEndAddr  alias ,,addrtype1,,,,,,,,
    SATTACH bdcchk
    SATTACH bdcdep
    SATTACH venphn
    SATTACH venmisc
    --SATTACH taxidno
    SATTACH BdInv
    SATTACH BdInvDtl
    SATTACH payrollaccrual
    SATTACH payrollempl
    BREAK
  DEFAULT
    SDISCONNECT ';driver={R:Base 7.0 Database Driver 
(*.rb1)};dbq=F:\rb7\Bar\ExistBar\Bar.rb1;'
    SDETACH vendlst
    SDETACH vEndAddr
    SDETACH bdcchk
    SDETACH bdcdep
    SDETACH venphn
    SDETACH venmisc
    --SDETACH taxidno
    SDETACH BdInv
    SDETACH BdInvDtl
    SDETACH payrollaccrual
    SDETACH payrollempl
    BREAK

ENDSW
CLEAR VAR %1
RETURN

{end code}


----- Original Message ----- 
From: <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Friday, January 27, 2012 1:33 PM
Subject: [RBASE-L] - RE: UNLOADIN SAttached definitions


Dennis,

Do you want a dsnless connection something like this;

set v vsconnect text= +
'MS Access Database;driver={Microsoft Access Driver (*.mdb, *.Accdb)} 
{;dbq='
set v vsconnect=(.vsconnect+.vdirname+'SomeAccessDatabase.mdb')
sconnect .vsconnect
sattach temporary ASalesImport using all

Or does the sattach change ? Then you could build a list of foreign tables 
to sattach and pick from the list.

Does this help  ?

Bil Eyring
  -------- Original Message --------
  Subject: [RBASE-L] - RE: UNLOADIN SAttached definitions
  From: Dennis McGrath <[email protected]>
  Date: Fri, January 27, 2012 9:31 am
  To: [email protected] (RBASE-L Mailing List)


  Bill,

  Looking for a way to unload the commands to SATTACH foreign tables.

  Currently I have to UNLOAD STRUCTURE, edit the file and grab the section 
that does this.
  On a large db (tablewise) this is a SLOW process!
  The unload is instant but editing a large file is a pain.

  Dennis McGrath
  Software Developer
  QMI Security Solutions
  1661 Glenlake Ave
  Itasca IL 60143
  630-980-8461
  [email protected]

------------------------------------------------------------------------------

  From: [email protected] [mailto:[email protected]] On Behalf Of Bill 
Eyring
  Sent: Thursday, January 26, 2012 7:12 PM
  To: RBASE-L Mailing List
  Subject: [RBASE-L] - RE: UNLOADIN SAttached definitions

  Dennis

  If you need data and structure all you have to do is;

  PRoject NewTableName from SAttachedTableName using all

  After that you can then just do an Unload data and structure from the 
projected table and you will not have the SCONNECT/SATTACH  command.

  Hope that helps.

  Bill Eyring


------------------------------------------------------------------------------

  From: [email protected] [mailto:[email protected]] On Behalf Of Dennis 
McGrath
  Sent: Thursday, January 26, 2012 10:44 AM
  To: RBASE-L Mailing List
  Subject: [RBASE-L] - UNLOADIN SAttached definitions
  If I UNLOAD STRUCTURE, included in the file are commands to 
SCONNECT/SATTACH permanently SATTACHed tables.

  Is there an UNLOAD synatax to just UNLOAD the SCONNECT/SATTACH?

  UNLOAD TABLEDEF gives me just the table definitions.

  Dennis McGrath
  Software Developer
  QMI Security Solutions
  1661 Glenlake Ave
  Itasca IL 60143
  630-980-8461
  [email protected]


Reply via email to