gettingstarted
[Top] [All Lists]

DB Save As

To: gettingstarted at lists dot realsoftware dot com
Subject: DB Save As
From: GAmoore at aol dot com
Date: Fri, 28 May 2004 23:27:19 EDT
Delivered-to: gettingstarted at lists dot realsoftware dot com
List-help: <mailto:gettingstarted-request@lists.realsoftware.com?subject=help>
List-id: Getting Started <gettingstarted.lists.realsoftware.com>
List-post: <mailto:gettingstarted@lists.realsoftware.com>
Hi
I am trying to aclimate myself to the new database model in RB 5.5.2 and I 
have two quick quesitons.
1. When I create a DatabaseRecord for the purposes of inserting a record, how 
does
that record know which table in the database it must be formatted for? For 
example,
if I have a DB with table1 and table2, and I say dim r as databaserecord, r = 
new databaserecord,
can I use r to insert records into table1 and table2?

____________________________________________________
2. If I want to take an existing database and SAVE AS ...what commands do I 
use?
I see the examples in GetSaveFolderItem Function, and SaveAsDialog Class, but
they do not seem to allow CreateDatabaseFile. On the other hand, there is the 
dbconnect
and dbcreate methods. How are these reconciled into a single method to save a 
database
into a file?


   Dim OutputText as String
   Dim dlg as SaveAsDialog
   Dim dbFile as FolderItem
   Dim db as REALDatabase
   dim r as DatabaseRecord
   dim d as Date
   //__________________________________
   d     = new Date
   db    = new Realdatabase
   r = new DatabaseRecord   
   //_____ CREATE FILE __________________
   dlg=New SaveAsDialog
   dlg.promptText="Save the current class database as (file name)"
   outputText = "Classes"   + trim(winMain.popClYear.text) + left( 
trim(winMain.popClTerm.Text), 3)
   outputText = outputText + "(" + d.shortdate     + ").jdb"
   dlg.SuggestedFileName= outputText
   dlg.Title="Save current class schedule as ..."
   dbfile=dlg.ShowModal()

   If dbfile <> Nil then ...... (do stuff within here) end if
      ...........................(this won't work) ...but it did work with 
saving a text file before


thanks

Greg



_______________________________________________
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • DB Save As, GAmoore <=