Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



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

Posts: 37
Trades: 0
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
 
 
Register now for full access!
Old 09-10-2004, 11:49 AM
Junior Talker

Posts: 4
Trades: 0
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, 02:24 PM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
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
 
Reply     « Reply to ASP code fault - whats wrong with this?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 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.37413 seconds with 12 queries