473,326 Members | 2,255 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,326 software developers and data experts.

simple script not working with UPDATE

ok.... i dont know why this wont work. this is going to access DB on web.

var1a = Request.Form("h1")
var1b = Request.Form("h2")

strSQL = "UPDATE matches SET team1a = " & var1a & ", team1b = " & var1b & "
WHERE ID = '1'"

Conn.Execute (strSQL)

looks good to me... but i get the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2

i dont know what it is looking for. let me know if you need more
information. the field names are correct, the form field names are correct..
already looked at that.

Thanks for any help

Jeff
Jul 19 '05 #1
7 1628
Always, always, always, always, always, always first response.write your sql
string to find out what's going on.

var1a = Request.Form("h1")
var1b = Request.Form("h2")

strSQL = "UPDATE matches SET team1a = " & var1a & ", team1b = " & var1b & "
WHERE ID = '1'"
RESPONSE.WRITE STRSQL
RESPONSE.END

Do you see what's expected, and does what's returned work in the query thing
in Access itself?

Also see:
http://groups.google.com/groups?q=od...tserver.asp.db
and
http://groups.google.com/groups?q=bo...tserver.asp.db

Ray at work

"Jeff" <gi****************@verizon.net> wrote in message
news:Oi****************@TK2MSFTNGP14.phx.gbl...
ok.... i dont know why this wont work. this is going to access DB on web.

var1a = Request.Form("h1")
var1b = Request.Form("h2")

strSQL = "UPDATE matches SET team1a = " & var1a & ", team1b = " & var1b &
"
WHERE ID = '1'"

Conn.Execute (strSQL)

looks good to me... but i get the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2

i dont know what it is looking for. let me know if you need more
information. the field names are correct, the form field names are
correct..
already looked at that.

Thanks for any help

Jeff

Jul 19 '05 #2
Thanks for the fast response. I should have mentioned that it did have the
correct data when i did what you asked.
UPDATE matches SET team1a = batmasterson, team1b = Billhickok WHERE ID = '1'

I am not sure what you mean by working in access itself. Are you asking me
to build a query in the access program? with the result of the write sql?

Jeff

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP15.phx.gbl...
Always, always, always, always, always, always first response.write your sql string to find out what's going on.

var1a = Request.Form("h1")
var1b = Request.Form("h2")

strSQL = "UPDATE matches SET team1a = " & var1a & ", team1b = " & var1b & " WHERE ID = '1'"
RESPONSE.WRITE STRSQL
RESPONSE.END

Do you see what's expected, and does what's returned work in the query thing in Access itself?

Also see:
http://groups.google.com/groups?q=od...tserver.asp.db and
http://groups.google.com/groups?q=bo...tserver.asp.db
Ray at work

"Jeff" <gi****************@verizon.net> wrote in message
news:Oi****************@TK2MSFTNGP14.phx.gbl...
ok.... i dont know why this wont work. this is going to access DB on web.
var1a = Request.Form("h1")
var1b = Request.Form("h2")

strSQL = "UPDATE matches SET team1a = " & var1a & ", team1b = " & var1b & "
WHERE ID = '1'"

Conn.Execute (strSQL)

looks good to me... but i get the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2

i dont know what it is looking for. let me know if you need more
information. the field names are correct, the form field names are
correct..
already looked at that.

Thanks for any help

Jeff


Jul 19 '05 #3
Ok. I did put the returned info into access... when it ran.. it asked me for
parameters for the names that were there. which is weird. the names
themselves are what should have been put into the correct fields.
"Jeff" <gi****************@verizon.net> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Thanks for the fast response. I should have mentioned that it did have the
correct data when i did what you asked.
UPDATE matches SET team1a = batmasterson, team1b = Billhickok WHERE ID = '1'
I am not sure what you mean by working in access itself. Are you asking me
to build a query in the access program? with the result of the write sql?

Jeff

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@TK2MSFTNGP15.phx.gbl...
Always, always, always, always, always, always first response.write your sql
string to find out what's going on.

var1a = Request.Form("h1")
var1b = Request.Form("h2")

strSQL = "UPDATE matches SET team1a = " & var1a & ", team1b = " & var1b & "
WHERE ID = '1'"
RESPONSE.WRITE STRSQL
RESPONSE.END

Do you see what's expected, and does what's returned work in the query thing
in Access itself?

Also see:

http://groups.google.com/groups?q=od...tserver.asp.db
and

http://groups.google.com/groups?q=bo...tserver.asp.db

Ray at work

"Jeff" <gi****************@verizon.net> wrote in message
news:Oi****************@TK2MSFTNGP14.phx.gbl...
ok.... i dont know why this wont work. this is going to access DB on

web.
var1a = Request.Form("h1")
var1b = Request.Form("h2")

strSQL = "UPDATE matches SET team1a = " & var1a & ", team1b = " & var1b &
"
WHERE ID = '1'"

Conn.Execute (strSQL)

looks good to me... but i get the following error
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected

2
i dont know what it is looking for. let me know if you need more
information. the field names are correct, the form field names are
correct..
already looked at that.

Thanks for any help

Jeff



Jul 19 '05 #4

"Jeff" <gi****************@verizon.net> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Thanks for the fast response. I should have mentioned that it did have the
correct data when i did what you asked.
UPDATE matches SET team1a = batmasterson, team1b = Billhickok WHERE ID =
'1'
Your text data needs to be delimited with the ' character.
UPDATE matches SET team1a='batmasterson',team1b='Billhickok' WHERE ID='1'"
And is your ID really NOT a numeric field? The fact that you have that
delimited with the ' implies that it is not. That's odd, if so, I'd say.

I am not sure what you mean by working in access itself. Are you asking me
to build a query in the access program? with the result of the write sql?


No, meaning, you can copy and paste the result of the Response.Write sql
into the query window in Access and run it to see what happens in there.

Ray at work
Jul 19 '05 #5
p.s. Also read this:

http://www.aspfaq.com/show.asp?id=2035
Ray at work

"Jeff" <gi****************@verizon.net> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Thanks for the fast response. I should have mentioned that it did have the
correct data when i did what you asked.
UPDATE matches SET team1a = batmasterson, team1b = Billhickok WHERE ID =
'1'


Jul 19 '05 #6
Ok. I got it to work now.. i did leave the ' out.. and as fr as the ID.. it
should have been a number.. not sure why it wasn't.. but both of those
solved it for me.
thanks a million for your help
Jeff
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:ev**************@TK2MSFTNGP11.phx.gbl...
p.s. Also read this:

http://www.aspfaq.com/show.asp?id=2035
Ray at work

"Jeff" <gi****************@verizon.net> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Thanks for the fast response. I should have mentioned that it did have the correct data when i did what you asked.
UPDATE matches SET team1a = batmasterson, team1b = Billhickok WHERE ID =
'1'

Jul 19 '05 #7
You're quite welcome! :]

Ray at home

"Jeff" <gi****************@verizon.net> wrote in message
news:u8*************@TK2MSFTNGP11.phx.gbl...
Ok. I got it to work now.. i did leave the ' out.. and as fr as the ID.. it should have been a number.. not sure why it wasn't.. but both of those
solved it for me.
thanks a million for your help

Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bruce W...1 | last post by:
In my effort to learn PHP I'm playing with some simple email scripts. They worked a few days ago but they stopped working. The only thing I've done to this Windows 2000 PC in this time was a...
16
by: Fox | last post by:
I merged and modified these script which work perfectly fine as long as I use server.execute to access the VBS part (which is itself in another ASP file). When these I use a session variable to...
5
by: Mike | last post by:
I'm using a script provided by e-mailanywhere, it's a little too big for me. There's 1 text field and 1 password field in a form. OnSubmit, I would like both fields to be validated to look for...
4
by: Bob Sanderson | last post by:
I have a script that reads the computer date and writes it to a copyrite footer on a web page. The idea is to avoid having to update each page manually at the start of a new year. It works fine...
27
by: one man army | last post by:
Hi All- I am new to PHP. I found FAQTS and the php manual. I am trying this sequence, but getting 'no zip string found:'... PHP Version 4.4.0 $doc = new DomDocument; $res =...
1
by: Q1tum | last post by:
Hi all, I have a problem with my script, I'm using javascript DOM to update my page. The getPortals() function updates a select list whichs shows portals. The doUpdate() function updates a...
1
by: Chris Lieb | last post by:
I am new to XML Schema and am running into a bit of a snag. I have defined an XML-based scripting language for an updater program that I am working on. I would like to make a schema for this...
24
by: firstcustomer | last post by:
Hi, Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that someone will be able to point me to a ready-made solution to my problem! A friend of mine (honest!) is wanting to...
5
by: kkddrpg | last post by:
the database looks like this the database is called username_tpp (not really just using username as a sub) the table is called home it has field 1 : varchar(50) | latin1_swedish_ci | no...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
1
isladogs
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...
0
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...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
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
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...

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.