Deleting Records from Access...using FP2003

A

Abdul Sami

I am trying to delete records using DRW of FP2003 form an
Access Table but, this is giving me an error message...

Database Results Wizard Error
Your page contains a query with user input parameters that
could not be resolved.
This could happen if your DatabaseRegionStart webbot has
an empty or missing s-columnnames or s-columntypes
attributes.
You may need to read Microsoft Knowledge Base Article
817029.
 
J

Jim Buyens

In FP2003, the ASP DRW doesn't deal well with queries
other than SELECT.

Fortunately, this is very to do using only ASP code.
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 = "DELETE FROM ..."
cnMyDb.Execute sql, recsaff
cnMyDb.close
End If

For more info (albeint from the perspective of running
INSERT sttements) 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)
|/---------------------------------------------------
*----------------------------------------------------
 
B

Bob

Hello Jim,
I suppose this applies to UPDATE as well, I am having
trouble updating records. Is this code in your book
Microsoft Office FrontPage 2003 Inside Out.
It just so happens, I ordered the book last week, so I
hope all the answers are there.
Cheers,
Bob
 
J

Jim Buyens

Bob said:
Hello Jim,
I suppose this applies to UPDATE as well,

Yes, exactly.
I am having
trouble updating records. Is this code in your book
Microsoft Office FrontPage 2003 Inside Out.
It just so happens, I ordered the book last week, so I
hope all the answers are there.
Cheers,
Bob

This is more of an ASP topic than a FrontPage topic. However,
when the book comes, check out:

Chapter 42 - Scripting Web Pages on the Server
Appendix J - Processing Form Data with ASP and ASP.NET Pages

Thanks for buying the book, and good luck with your site.

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