Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make Access table updatable from the WEB environm
Message
 
 
To
28/05/2003 15:40:31
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00793692
Message ID:
00793718
Views:
18
Are you able to make modifications in this Access table directly in Access? Could it be User Rights problem?

I also recall, I saw similar question asked on www.tek-tips.com site in ASP forum, but don't remember the answer...

>I trying to update/insert a record into an Access table using VBScript utilizing sql INSERT/UPDATE command. But, each time it tells me that table is read only. Does anyone know what I need to set to make this table updatable? I've already set the folder where the VBScript and the Access table to read and write. I don't know where else I'll need to set. Any help is appreciated. Just encase I'm doing something wrong with my ASP script, attached is the code
>
>
><%
>'*********************************************
>SUB ADD_bac_msis
>
>If Request.Form("id")="" Then
>
>	strSQL = "INSERT INTO bac_msis (idnumber, sysname, type, bacfreq, population, status)"
>	strSQL = strSQL & " VALUES "
>	strSQL = strSQL & "('" & Request.Form("idnumber") & "',"
>	strSQL = strSQL & "'" & Request.Form("sysname") & "',"
>	strSQL = strSQL & Request.Form("type") & ","
>	strSQL = strSQL & Request.Form("bacfreq") & ","
>	strSQL = strSQL & Request.Form("population") &","
>	strSQL = strSQL & "'" & Request.Form("status") & "')"
>	Response.Write(strSQL & " <BR>")
>Else
>	strSQL = "UPDATE bac_msis SET "
>	strSQL = strSQL & "id=" & Request.Form("id") & ", "
>	strSQL = strSQL & "idnumber= '" & Request.Form("idnumber") &"', "
>	strSQL = strSQL & "sysname='" & Request.Form("sysname") &"', "
>	strSQL = strSQL & "type=" & Request.Form("type") &", "
>	strSQL = strSQL & "bacfreq=" & Request.Form("bacfreq") &", "
>	strSQL = strSQL & "population=" & Request.Form("population") &", "
>	strSQL = strSQL & "status='" & Request.Form("status") &"'  "
>	strSQL = strSQL & " WHERE id=" & Request.Form("id")
>	Response.Write(strSQL & " <BR>")
>End If
>
>strDBPath = Server.MapPath("newbac.mdb")
>Set cnnSearch = Server.CreateObject("ADODB.Connection")
>cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"
>
>on error resume next
>cnnSearch.Execute strSQL
>if err<>0 then
>	Response.Write("No update permissions! <BR>")
>else
> 	Response.Write("update successful. <BR>")
>end if
>cnnSearch.close
>
>END SUB
>'********************************
>'********************************
>  
>
><HTML>
><HEAD>
><P> BAC_MSIS TABLE UPDATE </P>
></HEAD>
><BODY>
><%
>  For Each Field In Request.Form
>     Response.Write "<b>" & Field & ":</b> " & Request.Form(Field) & "<BR>" & vbCrLf
>  Next
>  ADD_bac_msis
>  
><BR>
><A HREF="mysrch.asp">[Back to Search Form]</A>
></BODY>
></HTML>
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform