Stopping duplicate data entries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I asked this in thr programming section in a confusing maner. I figured giving it another shot wouldn't hurt but this time use the KISS technique
Here goes
FrontPage 200
Acess 200
IIS

I created a submission and edit forms using the database interface wizard (DIW). Modified them to our needs and both work great.
My question
Is there a way to stop duplicate entries that are being posted through the submission form and warn the user when there is a duplicate entry

I have looked and looked and cannot find anything on this anywhere
Any input is very much appreciated.
 
You need to select a field and then set it to be Index / No Duplicates. This will cause Access / ASP
to generate an error, if you want the error to be nicely worded, you will have to hand write some
code to test for the error then display your custom message.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


BruceBach said:
I asked this in thr programming section in a confusing maner. I figured giving it another shot
wouldn't hurt but this time use the KISS technique.
Here goes:
FrontPage 2002
Acess 2002
IIS 5

I created a submission and edit forms using the database interface wizard (DIW). Modified them to our needs and both work great.
My question:
Is there a way to stop duplicate entries that are being posted through the submission form and
warn the user when there is a duplicate entry?
 
Thanks Thomas,
Thats what I thought too but I already have the field in MS Access set to Indexed / No Duplicates and the problem is that when a user posts from the submission form it displays the confirmation form that says everything posted fine. But in-fact nothing gets posted. That makes this problem even worse, as the user thinks everything posted fine.
When posting through Access directly, however, Access does error.

I hope it's the field in Access your talking about because I can't find that option for the field on the submission form?

I have no problems hand coding an error page as a matter of fact I would love it if I could get to that point.

----- Thomas A. Rowe wrote: -----

You need to select a field and then set it to be Index / No Duplicates. This will cause Access / ASP
to generate an error, if you want the error to be nicely worded, you will have to hand write some
code to test for the error then display your custom message.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


BruceBach said:
I asked this in thr programming section in a confusing maner. I figured giving it another shot
wouldn't hurt but this time use the KISS technique.
Here goes:
FrontPage 2002
Acess 2002
IIS 5 our needs and both work great.
My question:
Is there a way to stop duplicate entries that are being posted through the submission form and
warn the user when there is a duplicate entry?
 
Bruce,

Check the files under _fpclass to see if you can determine where FP is blocking the display of the
error message or you can wait for help from someone that use the DRW.
--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


BruceBach said:
Thanks Thomas,
Thats what I thought too but I already have the field in MS Access set to Indexed / No Duplicates
and the problem is that when a user posts from the submission form it displays the confirmation form
that says everything posted fine. But in-fact nothing gets posted. That makes this problem even
worse, as the user thinks everything posted fine.
 
I'm surprised that setting constraints in the Access tble
designer doesn't have any effect in an ASP page. However,
this depends on the exact level where Microsoft coded the
constraint processing. There *are* some settings, such as
default formatting, that only take effect in Access forms
and reports.

Barring that, to achieve this level of customization,
you'd need to write your own ASP or ASP.NET code by hand.

For example, if you only want the same combination of
first and last name to appear once in the database, you
would first code a SELECT statement like:

SELECT Count(*) FROM EMPLOYEES
WHERE FIRSTNAME = 'GEORGE' AND LASTNAME = 'WASHINGTON'

Then, only if that query returned nothing, you would
perform an INSERT such as:

INSERT INTO EMPLOYEES (FIRSTNAME, LASTNAME)
VALUES ('GEORGE', 'WASHINGTON')

For a simple example of the insert code (without the
duplicate checking), 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)
|/---------------------------------------------------
*----------------------------------------------------

-----Original Message-----
I asked this in thr programming section in a confusing
maner. I figured giving it another shot wouldn't hurt but
this time use the KISS technique.
Here goes:
FrontPage 2002
Acess 2002
IIS 5

I created a submission and edit forms using the database
interface wizard (DIW). Modified them to our needs and
both work great.
My question:
Is there a way to stop duplicate entries that are being
posted through the submission form and warn the user when
there is a duplicate entry?
 
Thanks guys,
I think the files in the _fpclass folder are a bit hard to understand. There are error traps but it doesn't seem to effect the way Access hands off the error.

Jim's solution looks like it might work but the forms will probably have to be hand coded instead of using the DIW. I haven't had time to look through it all yet but will do that sometime this today.

Thanks again,
Bruce

----- Jim Buyens wrote: -----

I'm surprised that setting constraints in the Access tble
designer doesn't have any effect in an ASP page. However,
this depends on the exact level where Microsoft coded the
constraint processing. There *are* some settings, such as
default formatting, that only take effect in Access forms
and reports.

Barring that, to achieve this level of customization,
you'd need to write your own ASP or ASP.NET code by hand.

For example, if you only want the same combination of
first and last name to appear once in the database, you
would first code a SELECT statement like:

SELECT Count(*) FROM EMPLOYEES
WHERE FIRSTNAME = 'GEORGE' AND LASTNAME = 'WASHINGTON'

Then, only if that query returned nothing, you would
perform an INSERT such as:

INSERT INTO EMPLOYEES (FIRSTNAME, LASTNAME)
VALUES ('GEORGE', 'WASHINGTON')

For a simple example of the insert code (without the
duplicate checking), 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)
|/---------------------------------------------------
*----------------------------------------------------

-----Original Message-----
I asked this in thr programming section in a confusing
maner. I figured giving it another shot wouldn't hurt but
this time use the KISS technique.
Here goes:
FrontPage 2002
Acess 2002
IIS 5
interface wizard (DIW). Modified them to our needs and
both work great.
My question:
Is there a way to stop duplicate entries that are being
posted through the submission form and warn the user when
there is a duplicate entry?
 
There are just some things that can not be done with the DWI, and you have to learn to hand code. I
am sure MS will help you with this, but it would be paid support.

Once you learn to hand code, you open a whole new world of what can be done with ASP/VBScript
without the limitation of the FP database component.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


BruceBach said:
Now that I have had some time to play around, as I suspected, Jim's solution would incur hand
coding the forms and not using the DWI.
I would really like to avoid that as everything is working pretty well.

So if anybody has any other solutions it would be greatly appreciate it.

Does Microsoft have any support that anybody knows about?


----- Brucebach wrote: -----

Thanks guys,
I think the files in the _fpclass folder are a bit hard to understand. There are error traps
but it doesn't seem to effect the way Access hands off the error.
Jim's solution looks like it might work but the forms will probably have to be hand coded
instead of using the DIW. I haven't had time to look through it all yet but will do that sometime
this today.
 
Oh I can do it now, its just a lot of work. Like I said these forms are built and working and there are about 60 fields on each form.
I would show you the formst but I would have to kill you then... LOL J/K they are on our intranet and can't be seen from the outside world. It's really just a matter of having enough time to do it.

I usually hand code small forms and use the DWI for big forms. Thinking that ms office products would talk to each other properly is asking for too much I guess

Anyway thanks guys, appreciate the try

B


----- Thomas A. Rowe wrote: ----

There are just some things that can not be done with the DWI, and you have to learn to hand code.
am sure MS will help you with this, but it would be paid support

Once you learn to hand code, you open a whole new world of what can be done with ASP/VBScrip
without the limitation of the FP database component

--
=============================================
Thomas A. Rowe (Microsoft MVP - FrontPage
WEBMASTER Resources(tm
http://www.ycoln-resources.co
FrontPage Resources, WebCircle, MS KB Quick Links, etc
=============================================
To assist you in getting the best answers for FrontPage support see
http://www.net-sites.com/sitebuilder/newsgroups.as

BruceBach said:
Now that I have had some time to play around, as I suspected, Jim's solution would incur han
coding the forms and not using the DWI
I would really like to avoid that as everything is working pretty well
I think the files in the _fpclass folder are a bit hard to understand. There are error trap
but it doesn't seem to effect the way Access hands off the errorinstead of using the DIW. I haven't had time to look through it all yet but will do that sometim
this today
 
You shouldn't have to redo the forms, just the process that is use to insert the data into the
database that FP has already created.

ASP is not an office application, it is a Windows server technology/component.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


BruceBach said:
Oh I can do it now, its just a lot of work. Like I said these forms are built and working and
there are about 60 fields on each form.
I would show you the formst but I would have to kill you then... LOL J/K they are on our intranet
and can't be seen from the outside world. It's really just a matter of having enough time to do it.
I usually hand code small forms and use the DWI for big forms. Thinking that ms office products
would talk to each other properly is asking for too much I guess.
 
Back
Top