FP2003 DRW

J

Josh West

This looks like a bug to me...if I do a custom query (say an update or
delete) using DRW in FP2003, it doesn't add the s-columnnames or
s-columntypes values, resulting in the page producing this error message:

"The operation failed. If this continues, please contact your server
administrator."

If you switch on the debugging, it points you to a ms article that doesn't
exist: 817029

So is anyone else having this problem? (it looks that way doing a google
search), and also, anyone know the status of fixing this? I can do this
manually, but it's a pain in the butt, when compared to 2002 which never had
this problem. (Not to mention the time I blew figuring this out).

Thanks,
Josh West
(e-mail address removed)
www.joshwest.com
 
J

Jim Buyens

Indeed, there seem to be some issues using the FP2003 DRW
to run non-query SQL commands such as INSERT, UPDATE, and
DELETE.

The DRW was never designed for running non-query
commands; it just sort of worked by accident. But
Frontpage itself uses this techniqye: if you run the
Database Interface Wizard and create an ASP Database
Editor, it uses DRW's to run UPDATE and DELETE
statements. But FP2003 adds this comment to those DRW
pages:

Comment: -Important- If you modify this Database
Results region using the Database Results Wizard,
then your Database Editor will no longer work. If
you accidentally open the Database Results Wizard,
simply click Cancel to exit without regenerating
the Database Results region.

So, whoever wrote those commends knew there was a problem
evenb efore FP2003 shipped.

In the short term, it may be easier to just write your
own ASP code that runs the SQL statement you want. Here's
an example:

<%
Dim cnMyDb
Dim sql
Dim recsaff
If Request("btnSub") <> "" then
Set cnMyDb = Server.CreateObject("ADODB.Connection")
cnMyDb.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
Server.MapPath("fpdb/my.mdb") & ";"

sql = "UPDATE ..."
cnMyDb.Execute sql, recsaff

cnMyDb.close
End If
%>

Of course, you would specify the path from the current
Web page to your database as the Server.MapPath argument,
and you would replace UPDATE ... with your SQL statement.

Also, the code assumes that your form contains a Submit
button named btnSub. The initial If statement determines
whether the ASP page is running:

o Because of a link from another page (in which case
Request("btnSub") will be empty), or
o Because the visitor has clicked the Submit button (in
which case Request("btnSub") will contain the button
label).

For additional information, browse:

Saving Form Data in a Database
http://www.interlacken.com/winnt/tips/tipshow.aspx?tip=44

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top