Help with UPDATE String

B

Bline

was sent the answer to this general problem once and can't seem to locate it
after hours of searching. I think it was a link to a very simple diagram of
two UPDATE strings one for numbers one for text.

I am attemptiing to do an Update Statement the code follows:

Update "ijf.mdb", "UPDATE temp1 SET TempID = (" & chr(39) &
Replace(Request.Form("ID"),"'","''") & chr(39) & ") WHERE ID = 1"

ID Is a number.

I get this error on my page:

Microsoft JET Database Engine error '80040e07'

Data type mismatch in criteria expression.

/test/brian/db_connection.inc, line 12

Line 12 of /test/brian/db_connection.inc reads

set rstemp=strConn.execute(query)

Is this a " ' issue and if so what is the appropriate syntax. Thank you for
your assistasnce

Billie (Bline)
 
J

Jon Spivey

Hi Bline,
We'd need to see the exact code you're using to help with this, how you're
generating the sql statement and how you're executing it. Post it up and I'm
sure we'll get you sorted
 
B

Bline

Thanks for agreeing to assist. I am sorry but couldn't find how to do an
attachment so here' a link to the page. I tried to include the code but it
made the message to long.

http://www.inglemoorvikings.org/test/brian/gamereport3.asp

I am also trying to put validation in but the tab sequence and rules I put
in don't seem to function? Ideas. Thanks again and if you can tell me how to
pots an attachment I'd do so.

Bill (Bline)
 
T

Thomas A. Rowe

What do you mean by the validation script doesn't work, how are you testing it?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
B

Bline

If I said script I didn't mean to. What I mean is that I have followed the
instructions in Front Page to require values, secify data type, tab sequence
& include messages to the user, etc. but non pf it seems to work.

Thanks Bline
 
B

Bline

I treid the following but it wouldn't let me view the page at all when I
called it up.

if Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Update "ijf.mdb", "UPDATE temp1 SET TempID = (" & chr(39) &
Replace(Request.Form(ID),"'","''") & chr(39) & ") WHERE ID = 1"
Response.write " Lee "
end if
%>


<%
Response.write "Hartline"
if Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Update "ijf.mdb", "UPDATE GameNUM SET GameNumber = (" & chr(39) &
Replace(Request.Form(ID),"'","''") & chr(39) & ") WHERE ID = 1"

end if
%>
Quotes deleted around ID is that what you meant.

Billie Bline
 
B

Bline

Opps I feeel like an idiot...

Turns out I had moved only part of the processing to the receiving page. I
looked at it for hours and it never dawned on me. Oh what it must be like to
know what you're doing. Thanks to all that help as always, especially Stefan
(You're GREAT)

Billie [Bline]
 
S

Stefan B Rusynko

Glad you cleaned it up an ironed it out




| Opps I feeel like an idiot...
|
| Turns out I had moved only part of the processing to the receiving page. I
| looked at it for hours and it never dawned on me. Oh what it must be like to
| know what you're doing. Thanks to all that help as always, especially Stefan
| (You're GREAT)
|
| Billie [Bline]
|
| "Bline" wrote:
|
| > I treid the following but it wouldn't let me view the page at all when I
| > called it up.
| >
| > if Request.ServerVariables("REQUEST_METHOD") = "POST" Then
| > Update "ijf.mdb", "UPDATE temp1 SET TempID = (" & chr(39) &
| > Replace(Request.Form(ID),"'","''") & chr(39) & ") WHERE ID = 1"
| > Response.write " Lee "
| > end if
| > %>
| >
| >
| > <%
| > Response.write "Hartline"
| > if Request.ServerVariables("REQUEST_METHOD") = "POST" Then
| > Update "ijf.mdb", "UPDATE GameNUM SET GameNumber = (" & chr(39) &
| > Replace(Request.Form(ID),"'","''") & chr(39) & ") WHERE ID = 1"
| >
| > end if
| > %>
| > Quotes deleted around ID is that what you meant.
| >
| > Billie Bline
| >
| > "MikeR" wrote:
| >
| > > Take the quotes from around the number.
| > > MikeR
| > > Bline wrote:
| > > > was sent the answer to this general problem once and can't seem to locate it
| > > > after hours of searching. I think it was a link to a very simple diagram of
| > > > two UPDATE strings one for numbers one for text.
| > > >
| > > > I am attemptiing to do an Update Statement the code follows:
| > > >
| > > > Update "ijf.mdb", "UPDATE temp1 SET TempID = (" & chr(39) &
| > > > Replace(Request.Form("ID"),"'","''") & chr(39) & ") WHERE ID = 1"
| > > >
| > > > ID Is a number.
| > > >
| > > > I get this error on my page:
| > > >
| > > > Microsoft JET Database Engine error '80040e07'
| > > >
| > > > Data type mismatch in criteria expression.
| > > >
| > > > /test/brian/db_connection.inc, line 12
| > > >
| > > > Line 12 of /test/brian/db_connection.inc reads
| > > >
| > > > set rstemp=strConn.execute(query)
| > > >
| > > > Is this a " ' issue and if so what is the appropriate syntax. Thank you for
| > > > your assistasnce
| > > >
| > > > Billie (Bline)
| > >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top