ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 3rd, 2002, 01:10 AM
taipoh taipoh is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 1 taipoh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Error running ASP

Below is an ASP file forminput.asp ... I encountered an error which is described below when I tested the script on IIS... What type of error is it? How can I correct it?

<%
Dim cConn, sSQL
If Request.Form("posted") = 1 Then 'form posted

'Open the db connection
Set cConn = Server.CreateObject ("ADODB.Connection")
cConn.Open "test_db","",""
'Build the SQL string
sSQL = "INSERT INTO MyUsers (Name, Email)"
sSQL = sSQL & " VALUES ('" & Request.Form("Name") & "','" & Request.Form("Email") & "')"
'Execute the SQL
cConn.Execute sSQL 'line 12
'Output message
Response.Write "<p>Thankyou for signing up. Your information has been added to our database!</p>"
Else 'display the form %>
<form action="forminput.asp" method="POST">
Your Name <input type="text" name="Name"><br>
Your Email <input type="text" name="Email"><br>
<input type="hidden" name="Posted" value="1">
<input type="submit" value="Sign Up">
</form>
<% End If %>

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/portal/testing/forminput.asp, line 12

Reply With Quote
  #2  
Old December 3rd, 2002, 02:57 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
You just need to alter your connection settings.

Set cConn = Server.CreateObject ("ADODB.Connection")
cConn.Mode = 3 ' for writing
cConn.Open "test_db"

Don't forget to close your connection after u use it.

cConn.Close
set cConn = nothing

Reply With Quote
  #3  
Old December 3rd, 2002, 09:28 PM
aspnewbie aspnewbie is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Great White North
Posts: 361 aspnewbie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 50 sec
Reputation Power: 7
Send a message via MSN to aspnewbie
If you still get that error after you fix your connection info, then it's a permissions issue. Are you using an Access db or SQL server? If you are using access, you must ensure that user has read and write access to the folder where you have placed the db in.

http://www.aspfaq.com/show.asp?id=2062

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Error running ASP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT