📄 recrdset.tex
字号:
\membersection{wxRecordSet::GetForeignKeys}\func{bool}{GetPrimaryKeys}{\param{const wxString\& }{ptable = NULL}, \param{const wxString\& }{ftable= NULL}}Returns a list of foreign keys in the specified table (columns in thespecified table that refer to primary keys in other tables), ora list of foreign keys in other tables that refer to the primary key inthe specified table.If {\it ptable} contains a table name, this function returns a resultset containing the primary key of the specified table.If {\it ftable} contains a table name, this functions returns a result setof containing all of the foreign keys in the specified table and theprimary keys (in other tables) to which they refer.If both {\it ptable} and {\it ftable} contain table names, thisfunction returns the foreign keys in the table specified in {\itftable} that refer to the primary key of the table specified in {\itptable}. This should be one key at most.GetForeignKeys returns results as a standard result set. If the foreignkeys associated with a primary key are requested, the result set isordered by FKTABLE\_QUALIFIER, FKTABLE\_OWNER, FKTABLE\_NAME, and KEY\_SEQ.If the primary keys associated with a foreign key are requested, theresult set is ordered by PKTABLE\_QUALIFIER, PKTABLE\_OWNER, PKTABLE\_NAME,and KEY\_SEQ. The following table lists the columns in the result set. \begin{twocollist}\itemsep=0pt\twocolitem{0 (VARCHAR)}{PKTABLE\_QUALIFIER}\twocolitem{1 (VARCHAR)}{PKTABLE\_OWNER}\twocolitem{2 (VARCHAR)}{PKTABLE\_NAME}\twocolitem{3 (VARCHAR)}{PKCOLUMN\_NAME}\twocolitem{4 (VARCHAR)}{FKTABLE\_QUALIFIER}\twocolitem{5 (VARCHAR)}{FKTABLE\_OWNER}\twocolitem{6 (VARCHAR)}{FKTABLE\_NAME}\twocolitem{7 (VARCHAR)}{FKCOLUMN\_NAME}\twocolitem{8 (SMALLINT)}{KEY\_SEQ}\twocolitem{9 (SMALLINT)}{UPDATE\_RULE}\twocolitem{10 (SMALLINT)}{DELETE\_RULE}\twocolitem{11 (VARCHAR)}{FK\_NAME}\twocolitem{12 (VARCHAR)}{PK\_NAME}\end{twocollist}\membersection{wxRecordSet::GetNumberCols}\func{long}{GetNumberCols}{\void}Returns the number of columns in the result set. \membersection{wxRecordSet::GetNumberFields}\func{int}{GetNumberFields}{\void}Not implemented.\membersection{wxRecordSet::GetNumberParams}\func{int}{GetNumberParams}{\void}Not implemented.\membersection{wxRecordSet::GetNumberRecords}\func{long}{GetNumberRecords}{\void}Returns the number of records in the result set. \membersection{wxRecordSet::GetPrimaryKeys}\func{bool}{GetPrimaryKeys}{\param{const wxString\& }{table = NULL}}Returns the column names that comprise the primary key of the table with the specified name. If no name isgiven the class member {\it tablename} will be used. If both names are NULLnothing will happen. The data will be presented as a normal result set, organizedas follows:\begin{twocollist}\itemsep=0pt\twocolitem{0 (VARCHAR)}{TABLE\_QUALIFIER}\twocolitem{1 (VARCHAR)}{TABLE\_OWNER}\twocolitem{2 (VARCHAR)}{TABLE\_NAME}\twocolitem{3 (VARCHAR)}{COLUMN\_NAME}\twocolitem{4 (SMALLINT)}{KEY\_SEQ}\twocolitem{5 (VARCHAR)}{PK\_NAME}\end{twocollist}\membersection{wxRecordSet::GetOptions}\func{int}{GetOptions}{\void}Returns the options of the wxRecordSet. Options are not supported yet.\membersection{wxRecordSet::GetResultSet}\func{bool}{GetResultSet}{\void}Copies the data presented by ODBC into wxRecordSet. Depending on thewxRecordSet type all or only one record(s) will be copied.Usually this function will be called automatically after each successfuldatabase operation. \membersection{wxRecordSet::GetSortString}\func{wxString}{GetSortString}{\void}Not implemented. \membersection{wxRecordSet::GetSQL}\func{wxString}{GetSQL}{\void}Not implemented.\membersection{wxRecordSet::GetTableName}\func{wxString}{GetTableName}{\void}Returns the name of the current table. \membersection{wxRecordSet::GetTables}\func{bool}{GetTables}{\void}Gets the tables of a database. The data will be presented as a normal resultset, organized as follows:\begin{twocollist}\itemsep=0pt\twocolitem{0 (VARCHAR)}{TABLE\_QUALIFIER}\twocolitem{1 (VARCHAR)}{TABLE\_OWNER}\twocolitem{2 (VARCHAR)}{TABLE\_NAME}\twocolitem{3 (VARCHAR)}{TABLE\_TYPE (TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY,ALIAS, SYNONYM, or database-specific type)}\twocolitem{4 (VARCHAR)}{REMARKS}\end{twocollist}\membersection{wxRecordSet::GetType}\func{int}{GetType}{\void}Returns the type of the wxRecordSet: wxOPEN\_TYPE\_DYNASET orwxOPEN\_TYPE\_SNAPSHOT. See the wxRecordSet description for details.\membersection{wxRecordSet::GoTo}\func{bool}{GoTo}{\param{long}{ n}}Moves the cursor to the record with the number n, where the first recordhas the number 0. \membersection{wxRecordSet::IsBOF}\func{bool}{IsBOF}{\void}Returns true if the user tried to move the cursor before the first recordin the set.\membersection{wxRecordSet::IsFieldDirty}\func{bool}{IsFieldDirty}{\param{int}{ field}}Returns true if the given field has been changed but not saved yet.\func{bool}{IsFieldDirty}{\param{const wxString\& }{name}}Same as above, but uses the column name as the identifier.\membersection{wxRecordSet::IsFieldNull}\func{bool}{IsFieldNull}{\param{int}{ field}}Returns true if the given field has no data.\func{bool}{IsFieldNull}{\param{const wxString\& }{ name}}Same as above, but uses the column name as the identifier.\membersection{wxRecordSet::IsColNullable}\func{bool}{IsColNullable}{\param{int}{ col}}Returns true if the given column may contain no data.\func{bool}{IsColNullable}{\param{const wxString\& }{name}}Same as above, but uses the column name as the identifier.\membersection{wxRecordSet::IsEOF}\func{bool}{IsEOF}{\void}Returns true if the user tried to move the cursor behind the last recordin the set.\membersection{wxRecordSet::IsDeleted}\func{bool}{IsDeleted}{\void}Not implemented. \membersection{wxRecordSet::IsOpen}\func{bool}{IsOpen}{\void}Returns true if the parent database is open.\membersection{wxRecordSet::Move}\func{bool}{Move}{\param{long}{ rows}}Moves the cursor a given number of rows. Negative values are allowed. \membersection{wxRecordSet::MoveFirst}\func{bool}{MoveFirst}{\void}Moves the cursor to the first record. \membersection{wxRecordSet::MoveLast}\func{bool}{MoveLast}{\void}Moves the cursor to the last record. \membersection{wxRecordSet::MoveNext}\label{wxrecordsetmovenext}\func{bool}{MoveNext}{\void}Moves the cursor to the next record. \membersection{wxRecordSet::MovePrev}\label{wxrecordsetmoveprev}\func{bool}{MovePrev}{\void}Moves the cursor to the previous record. \membersection{wxRecordSet::Query}\func{bool}{Query}{\param{const wxString\& }{columns}, \param{const wxString\& }{table}, \param{const wxString\& }{filter = NULL}}Start a query. An SQL string of the following type will automatically begenerated and executed: ``SELECT columns FROM table WHERE filter".\membersection{wxRecordSet::RecordCountFinal}\func{bool}{RecordCountFinal}{\void}Not implemented. \membersection{wxRecordSet::Requery}\func{bool}{Requery}{\void}Re-executes the last query. Not implemented.\membersection{wxRecordSet::SetFieldDirty}\func{void}{SetFieldDirty}{\param{int}{ field}, \param{bool}{ dirty = true}}Sets the dirty tag of the field field. Not implemented.\func{void}{SetFieldDirty}{\param{const wxString\& }{name}, \param{bool}{ dirty = true}}Same as above, but uses the column name as the identifier.\membersection{wxRecordSet::SetDefaultSQL}\func{void}{SetDefaultSQL}{\param{const wxString\& }{s}}Not implemented.\membersection{wxRecordSet::SetFieldNull}\func{void}{SetFieldNull}{\param{void *}{p}, \param{bool }{isNull = true}}Not implemented.\membersection{wxRecordSet::SetOptions}\func{void}{SetOptions}{\param{int}{ opt}}Sets the options of the wxRecordSet. Not implemented. \membersection{wxRecordSet::SetTableName}\func{void}{SetTableName}{\param{const wxString\& }{tablename}}Specify the name of the table you want to use. \membersection{wxRecordSet::SetType}\func{void}{SetType}{\param{int}{ type}}Sets the type of the wxRecordSet. See the wxRecordSet class description for details.\membersection{wxRecordSet::Update}\func{bool}{Update}{\void}Writes back the current record. Not implemented.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -