[Gambas-user] gambas web script

Joshua Higgins joshiggins at ...1601...
Mon May 4 19:49:20 CEST 2009


I can't test this because I don't have a postgresql server running, but try
checking your apache error.log for more info...
(/var/log/apache2/error.log)

And you don't have to use <% %> on each line. e.g:

<% oCnn.Type = "postgresql" %>
<% oCnn.Host = "127.0.0.1" %>
<% oCnn.Login = "postgres" %>
<% oCnn.Password = "1234" %>

is the same as

<%
oCnn.Type = "postgresql"
oCnn.Host = "127.0.0.1"
oCnn.Login = "postgres"
oCnn.Password = "1234"
%>



2009/5/4 Wellington de Souza Pinto <wspinto at ...1405...>

> Below my teste.gbw
> Show erro. Any idea???
>
> Reguards,
>
> Souza, Wellington
>
> -------------------------------------------------------------------------------
>
> #!/usr/bin/env gbw2
> <% USE "gb.db" %>
> <% DIM i AS Integer %>
> <% DIM oCnn AS NEW Connection %>
> <% DIM oRs AS NEW Result %>
>
> <html>
> <h2>TESTE DE LEITURA DO POSTGRESQL/h2>
>
> <% oCnn.Type = "postgresql" %>
> <% oCnn.Host = "127.0.0.1" %>
> <% oCnn.Login = "postgres" %>
> <% oCnn.Password = "1234" %>
> <% oCnn.Name = "test" %>
> <% oCnn.Open %>
> <% oRs = oCnn.Exec("SELECT f_nome, f_funcao, usuario, senha FROM cadfun
> ORDER BY
> Lower(f_nome);") %>
>
> <tr>
>    <th align="left">Nome</th>
>    <th align="left">Funcao</th>
>    <th align="left">Usuario</th>
>    <th align="left">Senha</th>
> </tr>
> <% oRs.MoveFirst %>
> <% FOR i = 0 TO oRs.Max %>
>  <tr valign="top">
>    <td><%= oRs[0] %></td>
>    <td><%= oRs[1] %></td>
>    <td><%= oRs[2] %></td>
>    <td><%= oRs[3] %> </td>
>  </tr>
>  <% oRs.MoveNext %>
> <% NEXT %>
>
> </table>
>
> <% oRs = NULL %>
> <% oCnn.Close %>
>
> </html>
>
>
> ___________________________________________________________________________________
> Para fazer uma ligação DDD pra perto ou pra longe, faz um 21. A Embratel
> tem
> tarifas muito baratas esperando por você. Aproveite!
>
>
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations
> Conference from O'Reilly Media. Velocity features a full day of
> expert-led, hands-on workshops and two days of sessions from industry
> leaders in dedicated Performance & Operations tracks. Use code vel09scf
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
joshua higgins
>>>>>>------



More information about the User mailing list