Click here to Skip to main content
16,005,491 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Make a TEXT SELECTION Pin
enjoycrack10-Dec-05 17:03
enjoycrack10-Dec-05 17:03 
AnswerRe: Make a TEXT SELECTION Pin
Curtis Schlak.7-Dec-05 11:35
Curtis Schlak.7-Dec-05 11:35 
AnswerRe: Make a TEXT SELECTION Pin
Brent Lamborn9-Dec-05 10:35
Brent Lamborn9-Dec-05 10:35 
QuestionCheckbox to show checked mark Pin
edgarv7-Dec-05 4:04
edgarv7-Dec-05 4:04 
AnswerRe: Checkbox to show checked mark Pin
enjoycrack7-Dec-05 7:06
enjoycrack7-Dec-05 7:06 
GeneralRe: Checkbox to show checked mark Pin
edgarv7-Dec-05 9:28
edgarv7-Dec-05 9:28 
GeneralRe: Checkbox to show checked mark Pin
enjoycrack7-Dec-05 11:19
enjoycrack7-Dec-05 11:19 
GeneralRe: Checkbox to show checked mark Pin
edgarv8-Dec-05 2:42
edgarv8-Dec-05 2:42 
here is what the Update Form looks like



<%
'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsGuestbook 'Holds the recordset for the records in the database
Dim strSQL 'Holds the SQL query for the database
Dim lngRecordNo 'Holds the record number to be updated

'Read in the record number to be updated
lngRecordNo = CLng(Request.QueryString("ID"))

'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")

'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("aqpc.mdb")

'Set an active connection to the Connection object using DSN connection
'adoCon.Open "DSN=guestbook"

'Create an ADO recordset object
Set rsGuestbook = Server.CreateObject("ADODB.Recordset")

'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM aqtst where ID= "&request.querystring("linknumber")
'Open the recordset with the SQL query
rsGuestbook.Open strSQL, adoCon
%>


<title>AQPC Update Form


















<% = rsGuestbook("custom") %>
<% = rsGuestbook("custom") %>


<% = rsGuestbook("standard") %>









<%
'Reset server objects
rsGuestbook.Close
Set rsGuestbook = Nothing
Set adoCon = Nothing
%>




And here is what the update_entry.asp looks like


<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<% 'Dimension variables
Dim adoCon 'Holds the Database Connection Object
Dim rsUpdateEntry 'Holds the recordset for the record to be updated
Dim strSQL 'Holds the SQL query to query the database
Dim lngRecordNo 'Holds the record number to be updated
'Read in the record number to be updated
lngRecordNo = CLng(Request.Form("ID"))
'Create an ADO connection object
Set adoCon = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("aqpc.mdb")
'Create an ADO recordset object
Set rsUpdateEntry = Server.CreateObject("ADODB.Recordset")
'Initialise the strSQL variable with an SQL statement to query the database
strSQL = "SELECT * FROM aqtst"
'Set the cursor type we are using so we can navigate through the recordset
rsUpdateEntry.CursorType = 2
'Set the lock type so that the record is locked by ADO when it is updated
rsUpdateEntry.LockType = 3
'Open the recordset with the SQL query
rsUpdateEntry.Open strSQL, adoCon
'Update the record in the recordset
rsUpdateEntry.Fields("customer") = Request.Form("customer")
rsUpdateEntry.Fields("partdescription") = Request.Form("partdescription")
rsUpdateEntry.Fields("sketchnumber") = Request.Form("sketchnumber")
rsUpdateEntry.Fields("revision") = Request.Form("revision")
rsUpdateEntry.Fields("daviespartnumber") = Request.Form("daviespartnumber")
rsUpdateEntry.Fields("customerpartno") = Request.Form("customerpartno")
rsUpdateEntry.Fields("projedtleader") = Request.Form("projedtleader")
rsUpdateEntry.Fields("projectinitiationdate") = Request.Form("projectinitiationdate")
rsUpdateEntry.Fields("planrevisiondate") = Request.Form("planrevisiondate")
rsUpdateEntry.Fields("planrevision") = Request.Form("planrevision")
rsUpdateEntry.Fields("status") = Request.Form("status")


rsUpdateEntry.Fields("custom") =Len (Request.Form("custom")) = true
rsUpdateEntry.Fields("standard") =Len (Request.Form("standard")) = true


'Write the updated recordset to the database
rsUpdateEntry.Update
'Reset server objects
rsUpdateEntry.Close
Set rsUpdateEntry = Nothing
Set adoCon = Nothing
'Return to the update select page in case another record needs deleting
Response.Redirect "aq2"
%>

somebody suggested this
rsUpdateEntry.Fields("custom") =Len (Request.Form("custom")) = true

so I put it in the update_entry.asp. And now if I write it the regular way

rsUpdateEntry.Fields("custom") = (Request.Form("custom")

I get this error

Error Type:
Microsoft VBScript compilation (0x800A03EE)
Expected ')'
/aqpc/wb/update_entry.asp, line 37, column 56

so I have been using

rsUpdateEntry.Fields("custom") =Len (Request.Form("custom")) = true


I really need help with this. I really appreciate the help.
            Project
# <% = rsGuestbook("id") %>
             
    Customer


"
Project Leader
"  
    Part Description "
Project Initiation Date
"  
    Sketch Number "
Plan Revision Date
"  
    Revision "
Plan Revision
"  
    Davies Part Number "
Custom
"checked > 
    Customer Part Number "
Standard
"checked > 
 

QuestionCheckbox to Show State Pin
edgarv7-Dec-05 3:54
edgarv7-Dec-05 3:54 
QuestionRe: Checkbox to Show State Pin
edgarv7-Dec-05 4:01
edgarv7-Dec-05 4:01 
Questioncss help Pin
momoo6-Dec-05 18:38
momoo6-Dec-05 18:38 
AnswerRe: css help Pin
enjoycrack6-Dec-05 20:16
enjoycrack6-Dec-05 20:16 
GeneralRe: css help Pin
momoo6-Dec-05 20:27
momoo6-Dec-05 20:27 
GeneralRe: css help Pin
enjoycrack6-Dec-05 20:35
enjoycrack6-Dec-05 20:35 
QuestionCan someone help me send my form data to two urls Pin
jimo45-Dec-05 23:16
jimo45-Dec-05 23:16 
AnswerRe: Can someone help me send my form data to two urls Pin
Guffa6-Dec-05 1:20
Guffa6-Dec-05 1:20 
QuestionMSI deployment of web project to network share Pin
sunshinemurders5-Dec-05 19:47
sunshinemurders5-Dec-05 19:47 
AnswerFixed issue 1 .. now issue 2 ... Pin
sunshinemurders6-Dec-05 15:37
sunshinemurders6-Dec-05 15:37 
Questionproblem on date formating Pin
Rajkamal_dfine5-Dec-05 18:13
Rajkamal_dfine5-Dec-05 18:13 
AnswerRe: problem on date formating Pin
Guffa6-Dec-05 6:57
Guffa6-Dec-05 6:57 
Questionthree questions -- moving VWDWebCache to project folder? also FrontPage Server Extensions w/ w2k3 x64 problems, Subversion SVN Pin
Roman Nurik5-Dec-05 18:12
Roman Nurik5-Dec-05 18:12 
QuestionMozilla (Firefox) vs IE page displays Pin
gmhanna5-Dec-05 15:44
gmhanna5-Dec-05 15:44 
AnswerRe: Mozilla (Firefox) vs IE page displays Pin
Guffa6-Dec-05 7:27
Guffa6-Dec-05 7:27 
GeneralRe: Mozilla (Firefox) vs IE page displays Pin
gmhanna6-Dec-05 8:11
gmhanna6-Dec-05 8:11 
AnswerRe: Mozilla (Firefox) vs IE page displays Pin
Guffa6-Dec-05 20:46
Guffa6-Dec-05 20:46 

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.