Invalid SQL: INSERT INTO `swsessions` (`sessionid`, `ipaddress`, `lastactivity`, `useragent`, `isloggedin`, `sessiontype`, `typeid`, `dateline`, `status`) VALUES('29fa4ff73cae1ac370ac011d913d4271', '54.166.199.43', '1503427740', 'CCBot/2.0 (http://commoncrawl.org/faq/)', '0', '40', '0', '1503427740', '0'); (The table 'swsessions' is full)
Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\support.inm.com\includes\functions.php:410) in C:\Inetpub\support.inm.com\includes\functions.php on line 1612
Tips on using VIEWs in INM VizionDB - Support Center
inm logo
Corporate Website | Contact | Store | Support | Login  
     


Knowledgebase
View categorized listing of all common frequently asked questions.
Downloads
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM VizionDB for Director » Tips on using VIEWs in INM VizionDB
Support Page Banner
 Tips on using VIEWs in INM VizionDB

An SQL VIEW is a "virtual table" -- it is like specifying a SELECT query containing fields from one or more tables in the database, but a VIEW is stored like a table in the database structure. Views offer a convenient way to allow the end-user to access some information, while protecting others. They can also be used to join two tables in your database and present the underlying data as if the data were coming from a single table.

VIEWs are supported in INM VizionDB, by using SQL statements CREATE VIEW and DROP VIEW with the Database method SQLExec().
Example:

sqlStmt = "CREATE VIEW NYOffice AS SELECT employee_no, first_name, last_name FROM employee WHERE city = ‘ New York '"

member("DB_Employees").SQLExec(sqlStmt)

To delete a view you use the SQL statement DROP VIEW, but in order to delete it the view must not be in use. Therefore, if you have a Recordset member that accesses the view, you need to call member(“RS_NYOffice”).Clear(). Then you can call the database method SQLExec() as follows:


member("DB_Employees").SQLExec("DROP VIEW NYOffice")



Article Details
Article ID: 11
Created On: 04 May 2006 11:27 AM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom