|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hi - this is my first post in these forums and I really hope that someone can help me!!! The problem is that I keep getting the following error:
----- Microsoft JET Database Engine error '80040e14' Syntax error in INSERT INTO statement. editor/add2.asp, line 105 ----- Now, I have fairly limited knowledge of databases and asp but that's normally caused by some messed up syntax or alternatively a reserved name being used. I dont think I'm using a reserved name but cant work out where my problem is. I'd really appreciate some help from someone in finding out where I've gone wrong in my code... THE CODE:----------> <% strTitle=Request.form("Title")%> <% strTitle=Replace(strTitle, "'", "''") %> <% strCategory=Request.form("Category")%> <% strCategory=Replace(strCategory, "'", "''") %> <% strImgDesc=Request.form("ImgDesc")%> <% strImgDesc=Replace(strImgDesc, "'", "''") %> 'etc etc (I do this with like 20 different variables so I wont include them all) 'then... <% which = strID %> <% Set connDataServ=Server.CreateObject("ADODB.Connection") connDataServ.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _ "DATA SOURCE=" & server.mappath("../DataServ.mdb") sqlDataServ="INSERT INTO Articles (Title, Category, [Date], FirstPara, OtherParas, [Image], ImgDesc, ImgSrc, [Headline], MHometeam, MAwayteam, MHomescore, MAwayscore, MStadium, MHometeamkit, MAwayteamkit, MType, [MMatchdate], [URL_Table], [URL_Fixtures], [URL_Results], OtherClub) VALUES (" sqlDataServ = sqlDataServ & "'" & strTitle &"', " sqlDataServ = sqlDataServ & "'"& strCategory &"', " sqlDataServ = sqlDataServ & "'"& CDate(strDate) &"', " sqlDataServ = sqlDataServ & "'"& strFirstPara &"', " sqlDataServ = sqlDataServ & "'"& strOtherParas &"', " sqlDataServ = sqlDataServ & ""& strImage &", " sqlDataServ = sqlDataServ & "'" & strImgDesc &"', " sqlDataServ = sqlDataServ & "'"& strImgSrc &"', " sqlDataServ = sqlDataServ & ""& strHeadline & ", " sqlDataServ = sqlDataServ & "'" & strMHometeam &"', " sqlDataServ = sqlDataServ & "'" & strMAwayteam &"', " sqlDataServ = sqlDataServ & "'" & strMHomescore &"', " sqlDataServ = sqlDataServ & "'" & strMAwayscore &"', " sqlDataServ = sqlDataServ & "'" & strMStadium &"', " sqlDataServ = sqlDataServ & "'" & strMHometeamkit &"', " sqlDataServ = sqlDataServ & "'" & strMAwayteamkit &"', " sqlDataServ = sqlDataServ & "'" & strMType &"', " sqlDataServ = sqlDataServ & "'"& CDate(strMMatchdate) &"', " sqlDataServ = sqlDataServ & ""& strURL_Table &", " sqlDataServ = sqlDataServ & ""& strURL_Fixtures &", " sqlDataServ = sqlDataServ & ""& strURL_Results &", " sqlDataServ = sqlDataServ & "'" & strOtherclub &"')" Set rsDataServ=connDataServ.Execute(sqlDataServ) %> -------- I've attached the full asp file in case anyone needs to look at the rest of it. Thanks for any help anyone can give me. |
|
#2
|
|||
|
|||
|
Look inside the file I've attached for you!
---BEGIN EDIT--- Oh and I did forget to mention that Access uses the # symbol for Dates so be on the lookout for that!!! ---END EDIT--- Hope this helps! Sincerely Vlince Last edited by Vlince : August 29th, 2003 at 08:28 AM. |
|
#3
|
|||
|
|||
|
I cannot thank you enough for your help. I will try it out now 2 see if it works and will report back.
Thanks again |
|
#4
|
|||
|
|||
|
What you said helped a great deal. Unfortunately I'm now getting an error which I'm struggling to debug as well...
--- Microsoft JET Database Engine error '80004005' Operation must use an updateable query. /wits/wits03/testdummy/editor/add2.asp, line 182 --- Line 181/182... Const adExecuteNoRecords = 128 objConn.Execute strSql, adExecuteNoRecords --- Not a clue what to do now!? Sorry to keep bothering you, but do you have any suggestions? Thanks very much. |
|
#5
|
|||
|
|||
|
Here, google a little and voila!
http://www.google.com/search?source...pdateable+query Hope this helps! Sincerely Vlince |
|
#6
|
||||
|
||||
|
Just for future reference: When you get asp and other microsoft errors, go look them up at the microsoft site. They usually tell what causes the error and how to fix it. Try that first.
|
|
#7
|
|||
|
|||
|
I did look on Google (I do so whenever I have asp problems) but it just so happens that I had two errors that I didn't know how to fix. I also had a look at the Microsoft website. Thanks for the help you gave me anyway. I dont want to bother you anymore, but if there is a one-line solution to my problem like I think (hope!) there is, plz do let me know!
Thanks for all your help. |
|
#8
|
||||
|
||||
|
Most likely cause: IUSER doesn't have write privelidges for the database. http://support.microsoft.com/defaul...b;EN-US;q175168 has the 4 most common reasons for the error.
|
|
#9
|
|||
|
|||
|
---BEGIN QUOTE---
I dont want to bother you anymore ---END QUOTE--- Who said anything about being bothered? That is nonsense! Are you saying that the google link I gave you didn't have an answer for your error message? Are you sure? Not that I want to doubt you or anything but there isn't 10 000 reasons for the type of error you're having. Make sure the <IUSER_machine_name> has the rights/permission to write on the database...make sure of that! Hope this helps! Sincerely Vlince |
|
#10
|
|||
|
|||
|
No it's just that you helped me so much in that attachment already that I didn't want to ask anything more from you!
I'm a bit confused about all this IUSER_machine stuff because I never used it on previous database-asp linkups I did (I really have very limited experience in asp), so I thought there might be another reason for it. Certainly the Microsoft page on it said that that was the most likely reason. I'll see if I can fix it like that... |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Spot the syntax error!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|