Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Web CGI
Re: Web CGI [message #27076 is a reply to message #27025] Thu, 24 June 2010 20:13 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
ikeuchi wrote on Mon, 21 June 2010 15:04

Hi everyone.
I wrote this topic only to demonstrate how easy is to develop WEB CGI with U++.
The code is simple and I really needed it for a project.

Best Regards!



#include <Core/Core.h>
#include <Oracle/Oracle8.h>


using namespace Upp;

CONSOLE_APP_MAIN
{
Oracle8 oracle;
String raw_get = getenv("QUERY_STRING");
String id_code;
id_code = raw_get.Mid(3, 12);
oracle.Open("user/pwd@server:1521/sid", false, NULL);
Sql sql(oracle);
sql.Execute("SELECT ADD_TEXT FROM SOMETABLE WHERE ADD_ENTITY = 'TASK' AND ADD_CODE = '" + id_code + "'");
sql.Fetch();
Cout() << "Content-type: text/html\n\n";
Cout() << "<html><head></head><body>";
Cout() << "<pre style=\"font-family:verdana;size:10\">" + sql[0].ToString() + "</pre>";
Cout() << "</body></html>";
}



The only possible problem here is that "oracle.Open" can take quite a long time in certain circumstances.

I am looking forward to somebody trying FastCGI... Smile

Mirek
 
Read Message
Read Message
Read Message
Read Message icon4.gif
Read Message
Previous Topic: [FIXED] X11 GLCtrl broken again ?
Next Topic: navigate does not always work correctly
Goto Forum:
  


Current Time: Tue May 07 03:51:17 CEST 2024

Total time taken to generate the page: 0.02664 seconds