🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.infosystems.intranet
Article #5

Re: Manipulating databases from the web!

#5
From: Mike Ross
Date: Mon, 29 Sep 1997 00:00
114 lines
5679 bytes
Just do it yourself - it's really not very hard. Just do something like
this:

<%
Set DataConn = Server.CreateObject("ADODB.Connection")
DataConn.Open "DSN=YourDB", "Admin", "password"
Set cmdTemp = Server.CreateObject("ADODB.Command")
Set recordSet = Server.CreateObject("ADODB.Recordset")
cmdTemp.CommandText = "SELECT `FieldOne`, `FieldTwo`, `FieldThree`, 
FROM `YourTable`
cmdTemp.CommandType = 1
Set cmdTemp.ActiveConnection = DataConn
recordSet.Open cmdTemp, , 1, 3
%>

<table width="100%" border=1>
<tr>
    <td>Field One Label"</td>
    <td>Field Two Label"</td>
    <td>Field Three Label"</td>
</tr>
<%
do while not recordSet.EOF
%>
<tr>
    <td>
        <%=recordset("FieldOne")%>
    </td>
    <td>
        <%=recordset("FieldTwo")%>
    </td>
    <td>
        <%=recordset("FieldThree")%>
    </td>
</tr>
<%
Loop
%>
</table>


That's basically all there is to it - there are various flourishes and
bells and whistles you can add, but the code above basically will
display the data from a table in a web page.

Kailan Oro wrote:
> 
> Hi, I am trying hard to find an application which will enable me to
> display and edit databases via the Web. I'd expect it to work with
> more or less any database (give that I have the correct ODBC
> drivers, etc), but for now it must work with a SYBASE database. I
> have Intersolv v3.0 ODBC driver for Sybase.
> 
> I'd simply like to display the data in a table (i.e. grid) format (NOT
> as a form which shows only one record at a time!), and to have
> update/insert/delete and perhaps save/cancel buttons. I realize
> that most products have the *ability* to do these things, and that
> I could implement this with much fiddling, but it would be great if I
> could find a product that is able to do this almost out of the box,
> with a wizard perhaps.
> 
> My first choice would be Java/JDBC, but many users here use
> OS/2, and I think that Java is still not all that stable under OS/2. In
> any case, I'd prefer a server-side solution so that I don't need to
> worry about bugs in different browsers.
> 
> I've evaluated the following:
> 
> * Microsoft Interdev: uses ODBC, and server-side VBScript or
>    JScript. It has a surprisingly good Data Form Wizard which almost
>    does what I require. However, it has a number of documented
>    bugs when working with Sybase, and I could see all of those.
>    Visual Studio Service Pack 1 is supposed to fix those, but after
>    applying it, it will always give a useless error (ASP0115), which
>    eventually hangs the ASP portion of IIS and can only be recovered
>    with a reboot (yawn). I can't guarantee that my ODBC driver is
>    perfect, but at least I could connect before applying the fix! I tried
>    re-installing Interdev and applying the fix again, but again it stopped
>    working totally with Sybase only after applying the fix.
> 
> * Lotus Domino (1.5), Lotus Notes 4.51: uses ODBC. This doesn't
>    seem to have a real grid/table control that I could use easily; it only
>    has text fields. I don't know much about the Notes model, but it seems
>    either hard or impossible (via LotusScript) to dynamically generate a
>    table which has a number of textfields with the database records in
>    them. I can't just make a document beforehand, because I have no way
>    of knowing how large a table will be.
>        From the Lorus web page, it seems that the ability to control
>    transactions has been disabled in LS:DO (LotusScript: Data Object) in
>    version 4.51, though it's possible to get around it by issuing straight SQL
>    commands to the database server.
>         There are also some restrictions on how exactly to program this in
>    order to not need ODBC driver loaded for each Notes client, or to get it to
>    show in a web browser via Domino.
> 
> * Borland Intrabuilder (1.01 trail edition): uses ODBC and server-side
>    Javascript. Again this doesn't have a grid control but initial attempts show
>    that I can delete/insert/update tables in the Form control (i.e. which shows
>    one record at a time on the page). Also a bit of a worry here in Australia is
>     that many distributors are still yet to stock version 1.0 :-(   (It's up to
>     version 1.5 now).
> 
> What else to try?? Cold Fusion sounds popular, but its company seems to
> only be in the US - too hard to get support from here. Powerbuilder is a great
> product, but can web.pb/PowerBuilder 6 now give good control of database
> tables on the web? Their products are still new and I haven't tried them yet.
> 
> There's got to be an application which can show database tables, as tables
> and not forms, on the web!
> 
> ____
> 
> Remove the x's from my email address.
Technical Details
Message-ID: <342FEFE7.405B@goldengate.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <342F20FA.5CF8@xxx.au1.xxx.ibm.xxx.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f7fda,9b40bd6a18dbef53
X-Google-Attributes: gidf7fda,public
X-Google-Thread: 111f59,9b40bd6a18dbef53
X-Google-Attributes: gid111f59,public
X-Google-Thread: 1589e5,9b40bd6a18dbef53
X-Google-Attributes: gid1589e5,public
X-Google-Thread: 10c5d2,9b40bd6a18dbef53
X-Google-Attributes: gid10c5d2,public
X-Google-Thread: 108a70,9b40bd6a18dbef53
X-Google-Attributes: gid108a70,public
From: Mike Ross <mross@goldengate.net>
Subject: Re: Manipulating databases from the web!
Date: 1997/09/29
Message-ID: <342FEFE7.405B@goldengate.net>
X-Deja-AN: 276715549
References: <342F20FA.5CF8@xxx.au1.xxx.ibm.xxx.com>
Reply-To: mross@goldengate.net
Newsgroups: comp.infosystems.intranet,comp.databases.sybase,comp.groupware.lotus-notes.misc,microsoft.public.vinterdev,borland.public.intrabuilder.server