Reply
ASP code fault - whats wrong with this?
Old 09-10-2004, 05:48 AM ASP code fault - whats wrong with this?
Experienced Talker

Posts: 37
Code:
<%

MyName=Replace(Request.Form("MyName"), "'", "''")

MyReason=Replace(Request.Form("MyReason"), "'", "''")

MyAuthorised=Request.Form("MyAuthorised")

MyDetails=Replace(Request.Form("MyDetails"), "'", "''")

MyDay=Request.Form("MyDay")

MyDate=Request.Form("MyDate")

MyMonth=Request.Form("MyMonth")

MyYear=Request.Form("MyYear")

MyPeriods=Request.Form("MyPeriods")

MyCover=Request.Form("MyCover")

MyFaculty=Request.Form("MyFaculty")

MyEmail=Request.Form("MyEmail")

 

if MyName="" then MyName=" "

if MyReason="" then MyReason=" "

if MyAuthorised="" then MyAuthorised=" "

if MyDetails="" then MyDetails=" "

if MyDay="" then MyDay=" "

if MyDate="" then MyDate=" "

if MyMonth="" then MyMonth=" "

if MyYear="" then MyYear=" "

if MyPeriods="" then MyPeriods=" "

if MyCover="" then MyCover=" "

if MyFaculty="" then MyFaculty=" "

if MyEmail="" then MyEmail=" "

 

 

 

Set MyConn=Server.CreateObject("ADODB.Connection")

ConnStr="DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("Absence.mdb")

 

 

SQL = "Insert Into TblMain (Name, Reason, Authorised, " _ 

& "Details, Day, Dte, " _ 

& "Month, Year, Periods, " _ 

& "Cover, FacultyAware, Email) Values ('"&MyName&"', '"&MyReason&"', '"&MyAuthorised&"', " _ 

& "'"&MyDetails&"', '"&MyDay&"', '"&MyDate&"', " _ 

& "'"&MyMonth&"', '"&MyYear&"', '"&MyPeriods&"', " _ 

& "'"&MyCover&"', '"&MyFaculty&"', '"&MyEmail&"')"

 

MyConn.Open connStr

MyConn.Execute (SQL)

MyConn.Close

Set MyConn = Nothing


I get this error message and i dunno why!



Code:
 

 

Microsoft OLE DB Provider for ODBC Driverserror '80004005'

 

[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query. /causeforconcern/submission7f.asp, line 42
Please help!
woody22 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 09-10-2004, 10:49 AM
Junior Talker

Posts: 4
Here is a link to Microsoft's knowledge base article 175168 which seems to address the problem.
http://support.microsoft.com/default...;en-us;q175168
MtnMinded is offline
Reply With Quote
View Public Profile
 
Old 09-10-2004, 01:24 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
This can usually be fixed by simply modifying the permissions on the database (.mdb) and the folder that it's in. They must be writable by everyone.
Anacrusis is offline
Reply With Quote
View Public Profile Visit Anacrusis's homepage!
 
Reply     « Reply to ASP code fault - whats wrong with this?
 

Thread Tools

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15082 seconds with 12 queries