[Gambas-user] How to use connections/resultsets from gb.web scripts?

paulwheeler paulwheeler at ...546...
Sat Nov 16 20:46:34 CET 2013


Piccoro,

My name is Paul Wheeler, and I have noticed you having trouble communicating with the Gambas group. I would like to help you. What is your native language?

If it is Spanish, then I could take your Spanish and translate it to English for sending to the Gambas group.

Even if it is another language, I might be able to help you. I understand some programming, so that may not be a problem.

If you are interested, send me an email.

I live in Arizona, so depending on where you live, it might take a few hours for me to respond.

paul


On 11/13/2013 12:58 PM, PICCORO McKAY Lenz wrote:
> From: Jesus <ea7dfh at ...2382...>
>>> May be because he's not a "winbuntu" user... ;-)
>> yes u have right.. i never use it! I've noticed that those who use it
>> in my office, always need more resources, more ram, more cpu power,
>> and the justification always "updates, vesion raise", but their individual
>> performance results never "raised", interesting, whereas with what I use, my results
>> always evolve, without need to consume more resources than i already have it
> Jesus, so then continue reading:
> 
> From: Beno?t Minisini <gambas at ...1...>
>> I think it's: USE "gb.db", with quotes.
> so then thanks benoit, was a mistake in the second mail as u can see
> note that u write :
>> 'USE gb.db'
> event the :
>> USE "gb.db"
> now thanks i can made now a little example, such its good to see
> my script are working, will solve many thinks (and off the php code)
> 
> thanks so much Benoit, next step its module procesing comunicacions
> (how can use modules or start a web page made from project ide)
> 
> 
> NOW A EXAMPLE (one that works using more components)
> -------------------------------------------------------------------------------------------------
> i already know its not the right usage due its a parse interpretation
> by gambas script interpreter, but for now its good example, so then
> Benoit provide one better (remenber that works also in gambas 3.4.0
> this one i use):
> 
> 1) made a gambas project, and when u made a gambas web page the
> extension will be "webpage"
> 
> 2) made this extension interpreted by the cgi script ( i mean a simple
> interpretation) as such apache or lighttpd does with python or perl
> scrips, of couse if python process pl files gbw3 will process webpages
> files
> 
> 3) so then expose the "webpage" file to http server (example sabe as
> xx.webpage and copy this file to /var/www/ html docs root), this are
> the code example to made a db connection, as u can see the firts line
> said that will be interpreted as script and procesed by cgi only the
> output results.. so next step its parse results between modules
> process
> 
> #!/usr/bin/env gbw3
> <%
> USE "gb.db"
> 
> DIM print AS String
> Dim conps As Connection
> 
> conps = New Connection  'creamos la instancia de la conexion
> conps.Type = "postgresql"
> conps.Name = "sys"     ' 1) abrir conexcion con el usuario y clave
> conps.host = "localhost"
> conps.Port = 5432
> conps.User = "sys"
> conps.Password = "1234"
> Try conps.Open
> %>
> <html>
> <h2>CGI script database connection example BY PICCORO Lenz McKAY</h2>
> <%
> print = " VenenuX connection postgres abierta? " & conps.Opened
> %>
> <%= print %><br>
> <%
> print = " host " & conps.Host & " base de datos " & conps.Name
> %>
> <%= print %><br>
> </html>
> 
> The script its really similar as mocosft script's pages .. such gambas
> its similar as mocosotf basic languaje...
> 
> gambas its great and easy to use.. this similitudes are something pain
> in my work je je je
> 
> 




More information about the User mailing list