Hi All,
I am having a totaly different sort of problem which is out of my efforts now so may be any one out of you might help me out of this.
I am using very simple code below to add a record in database and it is working, i mean record is being inserted in database
---------------------------------
<!--#include file='../include/connection.asp'-->
sql = "insert into tblbuilding (building_name, area_name,city_ name,descriptio n,lib_status,da ted,timed,logby ) values ('" & Request.Form("b uildingname") &"','" & request.Form("a reaname") &"','" & request.Form("c ityname") & "','" & descr & "','1','" & date() &"','" & time() & "','" & session("uname" )& "')"
conn.execute sql
Msg = "1 Record Added ....... "
Response.redire ct ("buildingsnaps .asp?ConfMsg="& Msg)
----------------------------
But the problem is that when this page execute and when page redirect to next page showing the values from same table where i am adding records, but it shows me double enteries with different id. There is no loop in above code but in my point of view page is being executed twice which cause double entry in database but i cant understand how this all is happening...
Kindly respond me soon to get out of this problem...
1 1625
Hi,
Hope so you still need this,
Try to debug the code by not redirecting the page "buildingsnaps. asp". Are you doing something on this page because which record is getting inserted twice?
Also, check if you are submitting the page more than once by mistake.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Robin S. |
last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope
I've done a better job of explaining myself below.
I am trying to produce a form to add products to a table (new products).
Tables:
tblCategoryDetails
CategoryID
SpecID
|
by: 6thirty |
last post by:
Hi,
I've created a stocktaking database using Access XP. This is indexed by two
fields - part number and shelf location.
I am currently inputting all the data via a form. When I have entered a
record such as:
part number 202354-001
location C1-01
|
by: stranger |
last post by:
My database is set up so people can input parts orders. Sometimes they
order the same parts on a monthly basis. I want to be able to duplicate
past parts orders and have it pasted in with a new primary key.
My first attempt seemed to work(minus a few Microsoft glitches). I used
a "duplicate" command button at first. This made a copy of the...
|
by: Jim Heavey |
last post by:
Trying to figure out the technique which should be used
to add rows to a datagrid. I am thinking that I would
want an "Add" button on the footer, but I am not quite
sure how to do that. Is that the best method? Do you
have a sample of how to do this?
|
by: Rudy |
last post by:
Hi all,
I know this is easy, just can't seem to get it. I have a windows form, and
a text box, with a value already in it. I need to add that value to a table.
It's just one value, so the entire row doesn't get filled. I have a
connection and all that stuff.
Private Sub btnPlaceBet_Click(ByVal sender As System.Object, ByVal e As...
| |
by: planetthoughtful |
last post by:
Hi All,
I have a C# ASP.NET page that submits back to itself to insert details
from a form into a database table. When / if the user refreshes the
page (and gets the standard warning that POST data will be
resubmitted), the previously submitted record is sumbitted again, and a
duplicate record is inserted into the table.
In PHP I would...
|
by: Manish |
last post by:
The topic is related to MySQL database.
Suppose a table "address" contains the following records
-------------------------------------------------------
| name | address | phone |
-------------------------------------------------------
| mr x | 8th lane | 124364 |
| mr x | 6th lane | 435783 |
| mrs x | 6th lane |...
|
by: Tom_F |
last post by:
To comp.databases.ms-access --
I just discovered, to my more than mild dismay, that some tables in my
Microsoft Access 2003 database have duplicate numbers in the
"AutoNumber" field. (Field Size is set to "Long Integer", and New
Values is set to "Increment".) I know that an old version of the Jet
database engine can cause this problem,...
|
by: VinArt |
last post by:
MS Acc 2003, XP
Thank you in advance for any help.
I have tables called "Makeup" and "Lines". Each makeup can have multiple lines.
Goal is to create a new "makeup" with identical "lines" except with a new makeup id.
I created a form Makeup Copy with Line Subform. In the main form there is ID (key field), Comments, Customer,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |