473,382 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

what is wrong with this database updating code?

here is the code:
--------------------------------------------------------------------
set mySql = oConn.Execute("update personal_D set firstname='"&firstname&"', lastname='"&lastname&"', " &_
"area='"&area&"', street='"&street&"', homenumber='"&homenumber&"', phone1="&phone1&", " &_
"kidomet1='"&kidomet1&"', phone2="&phone2&", kidomet2='"&kidomet2&"', freetext='"&freetext&"', " &_
"hosname='"&hosname&"', hoskind='"&hoskind&"', hosage="&hosage&", hosprice="&hosprice&", " &_
"hosgender='"&hosgender&"', password='"&password&"', email='"&email&"' where username="&username&" ")
oConn.Close
Set oConn=nothing
--------------------------------------------------------------------

I don't find the problem! Error type: 0x80040E14

* the numeric fields are: username, phone1, phone2, hosage, hosprice.
thanks alot!
Feb 25 '07 #1
6 1389
vijaydiwakar
579 512MB
here is the code:
--------------------------------------------------------------------
set mySql = oConn.Execute("update personal_D set firstname='"&firstname&"', lastname='"&lastname&"', " &_
"area='"&area&"', street='"&street&"', homenumber='"&homenumber&"', phone1="&phone1&", " &_
"kidomet1='"&kidomet1&"', phone2="&phone2&", kidomet2='"&kidomet2&"', freetext='"&freetext&"', " &_
"hosname='"&hosname&"', hoskind='"&hoskind&"', hosage="&hosage&", hosprice="&hosprice&", " &_
"hosgender='"&hosgender&"', password='"&password&"', email='"&email&"' where username="&username&" ")
oConn.Close
Set oConn=nothing

--------------------------------------------------------------------

I don't find the problem! Error type: 0x80040E14

* the numeric fields are: username, phone1, phone2, hosage, hosprice.
thanks alot!
add one space before and after "&" then try again again check for msaccess reserved keywords might be(password,email)
Feb 26 '07 #2
Look at this full updating document:
__________________________________________________ ______
<html>
<head></head>
<body>
<%
firstname=Request.Form("firstname")
lastname=Request.Form("lastname")
area=Request.Form("area")
street=Request.Form("street")
homenumber=Request.Form("homenumber")
phone1=Request.Form("phone1")
kidomet1=Request.Form("kidomet1")
phone2=Request.Form("phone2")
kidomet2=Request.Form("kidomet2")
freetext=Request.Form("freetext")

hosname=Request.Form("hosname")
hoskind=Request.Form("hoskind")
hosage=Request.Form("hosage")
hosprice=Request.Form("hosprice")
hosgender=Request.Form("hosgender")

username=Request.Form("username")
password=Request.Form("password")
email=Request.Form("email")

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\inetpub\wwwroot\mydata.mdb;" & _
"Uid=admin;" & _
"Pwd=;"
mySql = "UPDATE personal_D SET firstname='"&firstname&"', lastname='"&lastname&"', " &_
"area='"&area&"', street='"&street&"', homenumber='"&homenumber&"', phone1='"&phone1&"', " &_
"kidomet1='"&kidomet1&"', phone2='"&phone2&"', kidomet2='"&kidomet2&"', freetext='"&freetext&"', " &_
"hosname='"&hosname&"', hoskind='"&hoskind&"', hosage='"&hosage&"', hosprice='"&hosprice&"', " &_
"hosgender='"&hosgender&"', password='"&password&"', email='"&email&"' where username='" & username & "' "

oConn.Execute (mySql)
oConn.Close
Set oConn=nothing
%>
<script language="javascript">
window.history.back(-1);
</script>
</body>
</html>
__________________________________________________ ______
After changing the details in the form and clicking submit, it takes me back to the updating page, but when I look in the database, I see no changes!!!
What is wrong?

Thanks!!
Mar 1 '07 #3
jhardman
3,406 Expert 2GB
After changing the details in the form and clicking submit, it takes me back to the updating page, but when I look in the database, I see no changes!!!
What is wrong?
What kind of error handling do you have in place? It looks like you are getting some kind of error, but ignoring it and continuing. I would suggest temporarily commenting out the error handler so you can see where you are getting errors.

Jared
Mar 2 '07 #4
but i dont get any errors!!! what should I do??? I must solve this problem!

Thanks to all of you!!!
Mar 3 '07 #5
cam anyone do have any program in asp about searching who is using InStr? i have used like already but my instructor was not satisfied
Mar 3 '07 #6
jhardman
3,406 Expert 2GB
but i dont get any errors!!! what should I do??? I must solve this problem!

Thanks to all of you!!!
Yes, yes, I know. I think you are getting errors but have some type of error handler in place which is erasing your errors and continuing. That's why I asked what type of error handler you have. Very quickly, search your code for the phrase "on error". If you have a line with this phrase, put a single quote (') at the start of the line. Please let me know what you find.

Jared
Mar 5 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: lkrubner | last post by:
Are there any benchmarks on how much an extra, unneeded VARCHAR, CHAR, INT, BIGINT, TEXT or MEDIUMTEXT slows down a database call with MySql? PostGre info would also be useful. I'm trying to...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
5
by: Koen | last post by:
Hi all, I am experimenting with DAO. I wrote this sub to update one specific field of one specific row in one specific table. Nothing wrong with the SQL statement, but when I execute this I get...
2
by: RC | last post by:
I am updating/improving a working database for a non-profit organization. I am thinking of making a copy of the database at the office, bringing the copy to my house, making the changes and then...
1
by: iam247 | last post by:
Hi I have a web page which receives information from a form (using request.form) and also attempts to look at an Access query to read in recoeds to a variable named rsGroup. When I have the...
2
by: Aaron Ackerman | last post by:
I cannot a row to this bound DataGrid to SAVE MY LIFE! I have tried everything and I am at a loss. The using goes into add mode with the add button adds his data then updates with the update...
3
by: Terry Olsen | last post by:
I've got 2 different web pages, both updating the same SQL database. One is for the Technician and one is for the Manager. The technician's update page works fine but the Manager's update page...
4
by: m.ra. via DotNetMonster.com | last post by:
hi. ive been using a certain code for updating information from a windows form to an Access database , and it was handling the addition of new information properly until now. now suddenly the...
3
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when...
3
by: Spoogledrummer | last post by:
Hi it's me again, still working on the sam 5 minute problem so feeling kind of thick now. I've dumped the idea of using a textarea for now and am using a textbox instead but am struggling when it...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.