Click here to Skip to main content
15,908,776 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Order data in table by header Pin
Serpiente13-Jan-06 5:33
Serpiente13-Jan-06 5:33 
QuestionError Occurred creating Report Object: Pin
Rajkamal_dfine12-Jan-06 23:20
Rajkamal_dfine12-Jan-06 23:20 
QuestionSuggestions on implementation approach Pin
LongRange.Shooter12-Jan-06 11:46
LongRange.Shooter12-Jan-06 11:46 
GeneralRe: Suggestions on implementation approach Pin
Guffa12-Jan-06 22:54
Guffa12-Jan-06 22:54 
QuestionLooking for Recommendations to Setup a Forum Pin
Warren Stevens12-Jan-06 11:32
Warren Stevens12-Jan-06 11:32 
AnswerRe: Looking for Recommendations to Setup a Forum Pin
alex.barylski12-Jan-06 16:55
alex.barylski12-Jan-06 16:55 
AnswerRe: Looking for Recommendations to Setup a Forum Pin
Arkett13-Jan-06 4:51
Arkett13-Jan-06 4:51 
Questionupdate Access DB Pin
leezardd12-Jan-06 9:54
leezardd12-Jan-06 9:54 
When I try to run an update query via ASP to an Access DB, I get the error below. The insert query works fine when I run it from Access, but not ASP. I can read from the DB fine, but can't write to it.

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

Code:
<% @Language=VBScript %>


<title>Guest Book


<%
IF request.form ("Message")="True" THEN
strTB1=request.form("To")
strTB2=request.form("EMailAdd")
strTB3=request.form("CC")
strTB4=request.form("Subject")
strMB1=request.form("Memo")
IF strMB1 = "" THEN
iLenMB1=255
ELSE
iLenMB1 = Len(strMB1)
END IF
'Connects to the Access driver and Access database in the Inetpub
'directory where the database is saved
strProvider = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Inetpub\Wwwroot\Tutorial\guestbook.mdb;"
'Creates an instance of an Active Server component
set objConn = server.createobject("ADODB.Connection")
'Opens the connection to the data store
objConn.Open strProvider
'Instantiate Command object and use ActiveConnection property to
'attach connection to Command object
set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = objConn
'Define SQL query
cm.CommandText ="INSERT INTO Guestbook (TB1,TB2,TB3,TB4,MB1) VALUES (?,?,?,?,?)"
'Define query parameter configuration information for guestbook fields
set objparam=cm.createparameter(, 200, , 255, strTB1)
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255, strTB2)
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255, strTB3)
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255, strTB4)
cm.parameters.append objparam
set objparam=cm.createparameter(, 201, , iLenMB1, strMB1)
cm.parameters.append objparam
cm.execute
response.write("Thank you!")
ELSE%>

Guestbook




To



Email Address



CC



Subject



Message






<%End if%>



Thanks!
AnswerRe: update Access DB Pin
Hesham Amin15-Jan-06 9:14
Hesham Amin15-Jan-06 9:14 
GeneralRe: update Access DB Pin
leezardd18-Jan-06 8:31
leezardd18-Jan-06 8:31 
Questioncount the items in listbox Pin
Vipin.d12-Jan-06 0:46
Vipin.d12-Jan-06 0:46 
AnswerRe: count the items in listbox Pin
Guffa12-Jan-06 2:26
Guffa12-Jan-06 2:26 
QuestionFree weblog template Pin
Meysam Mahfouzi11-Jan-06 19:15
Meysam Mahfouzi11-Jan-06 19:15 
AnswerRe: Free weblog template Pin
mrabaya14-Jan-06 7:32
mrabaya14-Jan-06 7:32 
QuestionDom Tree View Change needed Pin
akarnik11-Jan-06 13:09
akarnik11-Jan-06 13:09 
QuestionHow to make the Grid scrollable Pin
satishrg11-Jan-06 4:24
satishrg11-Jan-06 4:24 
QuestionWhy ADODB.Recordset returns only one value? Pin
Tolga Palaoglu11-Jan-06 4:02
Tolga Palaoglu11-Jan-06 4:02 
AnswerRe: Why ADODB.Recordset returns only one value? Pin
Guffa11-Jan-06 15:05
Guffa11-Jan-06 15:05 
GeneralRe: Why ADODB.Recordset returns only one value? Pin
Tolga Palaoglu12-Jan-06 0:14
Tolga Palaoglu12-Jan-06 0:14 
QuestionSpecial symbols problem Pin
DenisFly11-Jan-06 2:26
DenisFly11-Jan-06 2:26 
AnswerRe: Special symbols problem Pin
Guffa11-Jan-06 15:07
Guffa11-Jan-06 15:07 
QuestionSource code comment line removal Pin
kevingpo11-Jan-06 0:44
kevingpo11-Jan-06 0:44 
AnswerRe: Source code comment line removal Pin
_NinethSense_12-Jan-06 23:07
_NinethSense_12-Jan-06 23:07 
QuestionAuthorisation in web.config Pin
stephmiddleton10-Jan-06 23:03
stephmiddleton10-Jan-06 23:03 
AnswerRe: Authorisation in web.config Pin
it_stud_200610-Jan-06 23:23
it_stud_200610-Jan-06 23:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.