PowerDynamo development notes

xiaoxiao2021-03-06  114

Author: dytt@yeah.net PowerDynamo is a product of Sybase EAServer, enables Web developers. Unlike the general web program, PowerDynamo's programs are all stored in the database instead of being stored on a physical hard disk, its file suffix is ​​STM. PowerDynamo needs to rely on IIS to run normally. Install POWERDYNAMO in Windows 2000, the installer automatically configures IIS. PowerDynamo's syntax is very similar to C, and case sensitive below PowerDynamo: 1, the server code is written in the ASP service segment code "" as: <% Page = 1%> in PowerDynamo 2, request can obtain data passed through GET or POST in ASP.

For example: Page = Request ("Page" Gets the method in PowerDynamo is Document.Value. Parameter name, for example: Page = Document.Value.page Note: Using Page = Document.Value.page in PowerDynamo, but the page No Page parameters are not passed, the system will report an error (no error in the ASP), the solution is as follows: if (! "= 1;} else {page = document.value.page; } 3, response.write is used in the ASP is response.write output in PowerDynamo by Document.write ("Welcome "); // <--- Document.writeln increases a newline 4 after the output string, the use method assignment of session: session.user_name =" dytt "; // <- where user_name can be arbitrary name Value: name = session.user_name; 5, jump Document.Redirect = "default.stm"; 6, standard usage for database connection conn = site.getConnection ("conn1"); // <---- this site .GetConnection ("Conn == Null) {document.writeln (" Connection Database Failed! "); Return; Query = Conn.Autocommit = true; query; query = conn.createQuery ); Query.cursortype = "forwardonly"; sql = "select * from tblname; query.setsql (sql); query.execute (); // If you only need to execute SQL statements You don't need to handle the results, then you can do it here. While (query.movenext ()) // <---- Here you need to note that if you want to handle the result, you must have the first thing: query .MOVENEXT (), the default pointer refers to the data name {// get the database in the first record {// to get the database in the first field of the current pointer (from 1 Start, starting with 0) // can also be this name = query.getValue ("name");} // If there is an error IF (Query.GeterrorCode ()! = 0) {document.writeln ("Do not do not Correct "); Docury.Geterrorinfo ()); Document.Writeln (" Please contact system management "); exit;} // Close connection query.close (); 7, reference PowerDynamo exists in 2 references A) Include,

转载请注明原文地址:https://www.9cbs.com/read-126647.html

New Post(0)