 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 15th, 2006, 05:14 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
...yes, thank you. My connectionstring seems to be ok. It is a standard one.
But I do not understand why this error turns up;
Feiltype:
Microsoft JET Database Engine (0x80040E14)
Syntaksfeil i FROM-setningsdelen
/innsjekk/registrering_1_mann_sjekk.asp, linje 61
dim objRs
set objRs=server.createobject("ADODB.recordset")
objrs.open "select * from Produkt where ProduktNavn =" & session("ProduktNavn"), kobling, adOpenForwardOnly, adLockOptimistic, adcmdtable
if objRs.eof Then
Response.redirect "meldingsboks.asp?melding="
Else
End if
while not objRs.eof
objRs("ProduktHaar") = Request.form("haar")
objRs("ProduktHaar") = Request.form("haar")
objRs("ProduktHaar") = Request.form("haar")
objRs("ProduktHaar") = Request.form("haar")
objRs.movenext
wend
objRs.close
set objRs = nothing
Response.redirect "registrering_2_mann.asp"
...this code is right from the scoolbook and basic.
Can you see whats wrong?
grstad
(som ikke finner ut av noe på egenhånd!)
PS Do you know any link which explains anything about cursortypes except ASP 3.0?
|
|

March 15th, 2006, 05:34 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
My Swedish / Finnish/ Danish (correct??) isn't so good, so I am not sure about the error you get. A little translation might help...
Anyway, what I think it's saying is that you have an error in your SQL statement.
What type is ProduktNavn? If it's not a numeric type, you need to enclose it in quotes, like
ProduktNavn = 'SomeValue'
If I were you, I'd get a book or two about ASP and ADO to get you up to speed. Learning by posting through this forum might be a fun, but definitely a slow way to learn ADO.
At the old Wrox site, there used to be a great post about cursor types. I couldn't find the original anymore, but here's a link to it on the mail archive website:
http://www.mail-archive.com/vbpro_da.../msg00081.html
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 16th, 2006, 02:23 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
.. I just want to tell the world, I have now managed to update my Access db. I hope it last, I never know in this programmers world!
Med vennlig hilsen
grstad
(Solen skinner om dagen. Det er et flott vintervær. Jeg burde ha tatt skiene fatt!)
|
|

March 16th, 2006, 04:36 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Great. Glad you have it working.
Quote:
|
quote:(Solen skinner om dagen. Det er et flott vintervær. Jeg burde ha tatt skiene fatt!)
|
What language is this??
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

March 17th, 2006, 01:09 PM
|
|
Friend of Wrox
|
|
Join Date: May 2005
Posts: 189
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
... How do I set a session to hold a longInteger value? Or is that not the case?
Session("BestillingID") = BestillingID
The field BestillingID is autonumber and a key-field in the db.
The error-msg is;
Feiltype:
Microsoft JET Database Engine (0x80040E07)
Ikke samsvar mellom datatyper i vilkårsuttrykk
/innsjekk/registrering_4_mann_sjekk.asp, linje 208
Line 208; Set RS = MyConn.Execute("SELECT * FROM Bestilling WHERE BestillingID = '" & session("BestillingID") & "'")
Med vennlig hilsen
grstad
PS. As you said, it is scandinavian. Or did you mean my code? :D
|
|

March 18th, 2006, 04:20 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi grstad,
Would you please start a new topic for a new question? longInteger hardly seem related to permissions. That'll make it easier for others to join the discussion or find a useful thread.
Also, could you please try to translate the error messages you get? There's no point for us in trying to guess what error message you might have gotten.
That said, if BestillingID is a numeric type in the database, you don't need to put it between apostrophes in the WHERE clause...
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|
 |