ih i have made an ASP page on which i am getting the values from a FORM and i am inserting those values into the AccessDatabase but the problem is that it is inserting each entry twice can any 1 help me out of this prob :(,,,,,,here is the code -
<%
-
codeno=Request("code_no")
-
partno=Request("prt_no")
-
product=Request("prd")
-
brand=Request("brand")
-
auto=Request("auto")
-
unitprice=Request("unit_price")
-
size=Request("size")
-
height=Request("height")
-
outd1=Request("out_d1")
-
outd2=Request("out_d2")
-
ind1=Request("in_d1")
-
ind2=Request("in_d2")
-
trepno=Request("t_rep")
-
rpno1=Request("rp_no1")
-
rpno2=Request("rp_no2")
-
rpno3=Request("rp_no3")
-
rpno4=Request("rp_no4")
-
rpno5=Request("rp_no5")
-
rpno6=Request("rp_no6")
-
-
-
Dim Connstr, ADSTK, strSQL
-
-
set ADSTK=Server.CreateObject("ADODB.Recordset")
-
Connstr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("db/db1.mdb")
-
-
strSQL = "Select Stk_items.Code_no, Stk_items.Prt_no, Stk_items.Prd, Stk_items.Brand, Stk_items.Auto, Stk_items.U_price, Stk_items.Size, Stk_items.Height, Stk_items.O_d1, Stk_items.O_d2, Stk_items.I_d1, Stk_items.I_d2, Stk_items.T_rep_no, Stk_items.Rep1, Stk_items.Rep2, Stk_items.Rep3, Stk_items.Rep4, Stk_items.Rep5, Stk_items.Rep6 From Stk_items;"
-
-
ADSTK.CursorType = 2
-
ADSTK.LockType = 3
-
-
ADSTK.Open strSQL, Connstr, 2
-
ADSTK.AddNew
-
-
ADSTK.Fields("Code_no")=codeno
-
ADSTK.Fields("Prt_no")=partno
-
ADSTK.Fields("Prd")=product
-
ADSTK.Fields("Brand")=brand
-
ADSTK.Fields("Auto")=auto
-
ADSTK.Fields("U_price")=unitprice
-
ADSTK.Fields("Size")=size
-
ADSTK.Fields("Height")=height
-
ADSTK.Fields("O_d1")=outd1
-
ADSTK.Fields("O_d2")=outd2
-
ADSTK.Fields("I_d1")=ind1
-
ADSTK.Fields("I_d2")=ind2
-
ADSTK.Fields("T_rep_no")=trepno
-
ADSTK.Fields("Rep1")=rpno1
-
ADSTK.Fields("Rep2")=rpno2
-
ADSTK.Fields("Rep3")=rpno3
-
ADSTK.Fields("Rep4")=rpno4
-
ADSTK.Fields("Rep5")=rpno5
-
ADSTK.Fields("Rep6")=rpno6
-
-
ADSTK.Update
-
ADSTK.Close
-
-
set ADSTK = Nothing
-
set Connstr = Nothing
-
Response.Redirect("Ad_stk.asp")
-
%>
-
0 1053 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: smita |
last post by:
Hi,
I have an xml file as below
<root>
<table id =1>
<user>abc</user>
<age>25</age>
</table>
<table id = 2>
<user>xyz</user>
|
by: RipTide |
last post by:
Background:
Using an unsupported/abandoned multi-user multi-database program that uses
Access 97 and Jet 3.5. Program itself appears to have been built with
PowerBuilder 6.5.
Databases reside on...
|
by: S. Graefner |
last post by:
Hello Folks, I'm a Relitive newbie to the blood sport of MS ACCESS. I
have designed and built a database with multiple, Related, tables. The
db works well, more by good luck then good planing I...
|
by: Bri |
last post by:
Greetings,
I'm having a very strange problem in an AC97 MDB with ODBC Linked tables
to SQL Server 7. The table has an Identity field and a Timestamp field.
The problem is that when a new record...
|
by: Terry |
last post by:
Hello,
Has anyone experienced the following problem following an Upsize from
Access 97 to SQL 2000 using the MS Upsize Wizard? Or can anyone see
what the problem might be.
Before Upsize...
|
by: Zachary Hilbun |
last post by:
The below is some test code to help me learn how to update a dataset.
It is supposed to read the value of UserCounter and write it back.
The UserCounter is being read correctly as 0, is 1 when...
|
by: Ecohouse |
last post by:
I have a main form with two subforms. The first subform has the child
link to the main form identity key.
subform1 - Master Field: SK
Child Field: TrainingMasterSK
The second subform has a...
|
by: radio1 |
last post by:
Configuration: Access 2002 and SQL Server 2000 using a .ADP Project.
I would VERY MUCH appreciate anyone's input into this problem I'm having.
I have a form in Access that does not permit...
|
by: Sagaert Johan |
last post by:
Hi
When i add a datacolumn to a dataset and then call Update on the dataset
then my MS Access datbase does not reflect the changes.(no coumn was added
to the table)
DataColumn newcolumn =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |