Article ID: 100369
Article Last Modified on 7/11/2006
Sub Form_Load () Redim x%(-32767 To -1) End Sub-or-
Sub Form_Load () Redim x%(1 To 32767) End SubNOTE: The manual and online Help do not state this but the number of indexes for an array seems to be limited to 32K elements. Therefore, you can do a Redim x%(-32767 To -1) or Redim x%(1 To 32767), both of which stay within 32K elements. You cannot do a Redim x%(-32767 To 32767) because this is 64K elements, which will cause a subscript out-of-range error.
Applies To
Table object
Description
With data access, determines which existing index is the current index
used to sort records in a Table and in recordsets created from that
Table. The default is blank. Not available at design time; read/write at
run time.
Syntax
table.Index [ = indexname ]
Remarks
The order of the data in a table is determined by the order in which the
data is added to the table. To alter the order of records fetched from
the table when using a Table object, set the Index property to the name
of an index in the Indexes collection of the Table's TableDef object. For
example, to set the index to be used on a Seek against the Titles table:
Dim Tb as Table, Db as Database
Set Db = OpenDatabase("Biblio.MDB")
Set Tb = Db.OpenTable("Titles")
Tb.Index = "PubID"
Tb.Seek "=", 3
The specified index must already be defined. If you set the Index
property to an index that doesn't exist, or if the index isn't set when
you use the Seek method, an error occurs.
In the Professional Edition, you can create a new Index in a Table by
creating a new Index object, setting its properties, then appending it to
the Indexes collection of the Table's TableDef.
The records in a Table can be ordered only according to the indexes
defined for it. To sort the Table records in some other order, create a
new Index for the table and append it to the Table's Index Collection, or
create a Dynaset or Snapshot that has a different sort order. To specify
the sort order for Dynasets and Snapshots, use the Sort property after
the Dynaset or Snapshot has been created. You can also set the order of a
Dynaset or Snapshot by including an Order By clause in a SQL statement
used to define the Dynaset or Snapshot.
The Index property of a control array element is not the same as the
Index property of a data access object.
Data Type
String
OpenQueryDef Example Code"If no horizontal scroll bar is specified for a text box and MultiLine is True, the text will automatically wrap even if the WordWrap property is False."
(Page 160) Numeric Values Stored in Variants -- IsNumeric() Function
The first line of code on the page indicates that the following
would return True.
IsNumeric("$100")
In fact, it and all currency figures used with the IsNumeric()
function return False.
(Page 188) The New Keyword
In the example at the top of the page, the local form
variable F is declared with the New keyword using the
Dim statement. To make the form variable and the
loaded form instance persist, use a Static or Global
variable instead.
(Page 194) Determining the Type of an Object Variable
You can use the If...TypeOf statement to determine the
control type of a custom control:
If TypeOf object Is objecttype
The identifier you use for 'object' is the class name of the custom
control. See the section "Specific Control Object Types" (P. 186)
for more information.
(Page 461) The Options Property
The constant values shown are in hexidecimal and should be preceded
with the &H notation. For example, DB_SQLPASSTHROUGH = &H40, not
decimal 40. See online Help (Options Property) or the file
DATACONS.TXT for the correct values.
(Page 454) BIBLIO.MAK and DATAMGR.EXE
The second sentence of the first paragraph should read:
If you installed the sample applications, you will find this
application in the \DATACTRL subdirectory of the Visual Basic
SAMPLES subdirectory (\VB\SAMPLES\DATACTRL).
The third sentence of the second paragraph shoul read:
You will find DATAMGR.EXE in the main Visual Basic directory
(\VB).
(Page 456) Getting a Quick Start. Item 6.
Delete the second sentence which begins "Set the DataSource
property for Label1 ..." under item 6.
(Page 458) Setting Database Properties at Design Time
This section incorrectly states that at design time the RecordSource
property of the Data Control lists all tables and queries. The
RecordSource property lists the tables in a database, not the
queries.
At design time, if the DatabaseName or Connect property of the Data
Control is set, the RecordSource property will retrieve a list of
all available tables. If the user knows of a valid SQL query for the
database, the RecordSource property will allow the query to be typed
in, but it does not list the queries.
(Page 459) The Connect Property
In the table for the Connect property setting, change the Connect
setting for Paradox from the following:
paradox;pwd=password;
to:
paradox 3.x;pwd=password;
NOTE: The database name in the Connect setting must match (except
for case) the database name in the VB.INI file. See page 148
of "Professional Features Book 2."
(Page 460) The DatabaseName Property
The first paragraph on this page incorrectly says the RecordSource
property of the Data Control lists all tables and queries. The
RecordSource property lists the tables, not the queries.
At design time, if the DatabaseName or Connect property of the Data
Control is set, the RecordSource property will retrieve a list of
all available tables. If the user knows of a valid SQL query for the
database, the RecordSource property will allow the query to be typed
in, but it does not list the queries.
(Page 462) The RecordSource Property
The first sentence in the second paragraph should be changed to
remove the reference to queries. Queries are not returned by the
RecordSource Property. In other words, change the following:
At design time you can choose from a list of database
tables and queries by first ...
to:
At design time you can choose from a list of database
tables by first ...
In addition, the following text and example should be changed:
For example, the following SQL query returns all of the columns
in the bibliography for authors who live in New York:
Data1.DatabaseName = "BIBLIO.MDB"
Data1.RecordSource = "Select * from Titles where state = 'NY'"
Data1.Refresh
The above should read:
For example, the following SQL query returns all of the columns
in the bibliography for publishers based in New York:
Data1.DatabaseName = "BIBLIO.MDB"
Data1.RecordSource = "Select * from Publishers where
state ='NY'"
Data1.Refresh
(Page 465) Adding a New Record
In the second paragraph in this section, the last sentence
should read, "Notice that using the buttons on the data
control or one of the Move methods to move to another record
will automatically save your added record."
(Page 530) Determining How an Object Is Displayed
In the first paragraph, the second sentence should read,
"the Icon check box," not "th eIcon check box."
(Page 550) Creating Invisible Objects
In the sample code, the following line has incorrect syntax:
MyWord = ObjVar.SuggestWord MyWord
The code should look like this:
MyWord = ObjVar.SuggestWord (MyWord)
(Page 552) Limitations in Visual Basic
Under the discussion "Arrays and User-Defined Types," the third
bulleted item should read: "You cannot assign the return value
of a property or method to an array variable or a variable of a
user-defined type."
(Page 554) Closing an Object
In the paragraph after the sample code, second sentence: It is
not true that invoking a Close method on an object sets
variables that refer to the object to Nothing.
(Page 582) Determining the Files You Need to Distribute
The following additional files are required for distributing
your Visual Basic applications:
DLL Name Required by (Professional Edition Only)
------------------------------------------------------
PDIRJET.DLL Crystal Reports for Visual Basic
PDBJET.DLL Crystal Reports for Visual Basic
MSAJT110.DLL Crystal Reports for Visual Basic
MSAES110.DLL Crystal Reports for Visual Basic
PDSODBC.DLL ODBC and Crystal Reports for Visual Basic
(Page 588) Example
All three references to CopyFile should end with a ")", not ",0)".
(Page 643) Symbol Tables
The first bullet item under Module Symbol Table should be under
Global Symbol Table:
- The actual text of the names of Sub and Function procedures
243520 Part 2: Corrections for Errors in VB Version 3.0 Manuals
Keywords: kbinfo kbref kbdocs KB100369