If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Err: No update permissionSyntax error in INSERT INTO statement.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-03, 23:26
applelzy applelzy is offline
Registered User
 
Join Date: Sep 2003
Location: Malaysia
Posts: 7
Err: No update permissionSyntax error in INSERT INTO statement.

PLz help i am trying to design a basic asp which include 3 page of asp file.
1.name.asp -which let ppl key in their name & gender
2.view.asp-View the input field from the name.asp and when click submit mean the page will go in to the display.asp
3. Display.asp- display a message to inform the ppl tht their data already been store.

But after my page run till display.asp some error will show on the browser page which is...

9/29/2003 11:09:16 AMNo update permissionSyntax error in INSERT INTO statement.

Below i include my display.asp part n my view.asp
--view.asp--
<p>Name:
<%response.write(request.form("txtname"))%>
<br>
Gender:
<%response.write(request.form("txtsex"))%>
</p>
<p>&nbsp;</p>
<form name="form1" method="post" action="display.asp">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset">
</form>


--display.asp--
<%
response.write(Now())
%>
<%
dim sql
dim conn
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:\Host\demo\demo.mdb"

txtname =replace(txtname,"'","''")
txtsex =replace(txtsex,"'","''")

sql="INSERT INTO tblUsers (Usernames,Gender)"
sql=sql & "VALUES"

on error resume next
conn.Execute sql,recaffected
if err<>0 then
Response.Write("No update permission" & err.description)
else
Response.Write("<h3>" & recaffected & " record added</h3>")
end if
Set sql = Nothing

conn.close
%>



<p><a href="name.asp">Back</a></p>
<table width="90%" border="0">
<tr>
<td width="11%">&nbsp;</td>
<td width="89%">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<%
dim rsSex
dim cnSex
dim strDBPath
set cnSex=server.CreateObject("adodb.connection")
set rsSex=server.CreateObject("adodb.recordset")
strDBPath = Server.MapPath("demo.mdb")

'cnSex.open "c:/Host/demo/demo.mdb"
cnSex.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"

'rsSex = "SELECT * FROM tblUsers "
Set rsSex = cnSex.Execute("SELECT * FROM tblUsers")
%>

<%
do while not rsSex.EOF
response.Write"<td>" & rsSex("Gender"& err.description)&"</td>"
rsSex.movenext
loop

rssex.close
set rssex = nothing
cnSex.Close
set cnSex = nothing
%>
</tr>
</table>


please help.thanks
Reply With Quote
  #2 (permalink)  
Old 09-29-03, 00:58
usha_nandini usha_nandini is offline
Registered User
 
Join Date: Sep 2003
Posts: 14
Hey applelzy!!

Are Usernames,Gender names of columns or values???
And where are the values to be inserted?

I guess the SQL query should be INSERT into TABLENAME (Column_name1, Column_name2) VALUES(x, y)

Am I right?

Usha
Reply With Quote
  #3 (permalink)  
Old 09-29-03, 04:23
applelzy applelzy is offline
Registered User
 
Join Date: Sep 2003
Location: Malaysia
Posts: 7
Yeah, tht is my table name & column name

Hi thr,
actually the tblusers is the correct table name & the usernames and gender r also the correct column field...
so can u plz help....
Reply With Quote
  #4 (permalink)  
Old 10-01-03, 17:40
asa2 asa2 is offline
Registered User
 
Join Date: Oct 2003
Posts: 1
Lightbulb updating a mdb

Hi. Long time ago I had that problem (I supouse). My ASP pages were working OK, but when I tried to update a registry, it came with a "not updeatable " permission. You have to go to the FOLDER (not to the database) that contain the database (in this case the DEMO Folder) and allow to write (Security). This is because the acces creates lock files in the folder, and then the folder must have the permissions.

I hope it helps you
Reply With Quote
  #5 (permalink)  
Old 10-03-03, 03:30
applelzy applelzy is offline
Registered User
 
Join Date: Sep 2003
Location: Malaysia
Posts: 7
Thanks problem solve

Thanks,yeah need to do something bout the mdb security folder.Thanks=)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On