home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / 9334 < prev    next >
Encoding:
Text File  |  1993-01-23  |  2.1 KB  |  60 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!wupost!monsanto.com!skcla.monsanto.com!jjfink
  3. From: jjfink@skcla.monsanto.com
  4. Subject: Re: Paradox questions
  5. Message-ID: <1993Jan22.091145.1@skcla.monsanto.com>
  6. Lines: 48
  7. Sender: news@tin.monsanto.com (USENET News System)
  8. Organization: Searle, Skokie, IL
  9. References: <2280@blue.cis.pitt.edu>
  10. Date: Fri, 22 Jan 1993 09:11:45 GMT
  11.  
  12. In article <2280@blue.cis.pitt.edu>, field@.cs.pitt.edu.cs.pitt.edu (Brian Field) writes:
  13.  > 1) I'm writing a script that changes the field types of several fields in a
  14. >     table.  Since I couldn't figure out how to do this directly from the
  15. >     manual, I recorded a script where I manually changed the file types,
  16. >     and checked out the script.  The script looks something like this:
  17. >     {Modify} {Restructure} {table_name} Down Down Down .....
  18. >     Right Right Backspace Backspace "A8"
  19. >     Now, this works ok, but doesn't allow me to change this field's
  20. >     relative position in the table, without going back and changing the
  21. >     script.
  22. >     Is there a way to do something instead, like:
  23. >     {Modify} {Restructure} {table_name} {field_name} {student name}
  24. >     {field_type} "A40"
  25.  
  26. Unfortunately, it's not quite so simple, but you can make things a little more
  27. flexible.
  28.  
  29. Putting the line
  30.  
  31. MOVETO [Field Name] LOCATE "Student Name"
  32.  
  33. will move you to the right line in the restructure.
  34.  
  35. > 2)     How does one access the contents of a field name that have been passed
  36. >     as an arguement to a procedure?  Do I need to use EXECUTE to do this,
  37. >     or is there an alternative?
  38.  
  39.     PROC GetFieldContents( theFieldName )
  40.         MOVETO FIELD theFieldName
  41.         RETURN []
  42.     ENDPROC
  43.  
  44. Remember to use MOVETO FIELD.  If you leave FIELD out, it tries to move to the
  45. image with the same name.  If your image is more than 11 characters long, or
  46. otherwise not a legal file specification, Paradox 3.5 will crash (known bug).
  47. I haven't tried to duplicate this in 4.0.
  48.  
  49. Joel
  50. -- 
  51. jjfink@skcla.monsanto.com
  52. ------------------------------------------------------------------------------
  53. "I want peace on earth, and goodwill towards man."
  54. "We don't do that kind of thing, we're the United States Government!"
  55.   -- from _Sneakers_
  56.