salman.pirani Posted August 10, 2012 Share Posted August 10, 2012 how can i connect asp with mysqlfor example if i want to send first name and last name into the columns of mysql so what will be the code . thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted August 10, 2012 Share Posted August 10, 2012 There are connection strings for various MySQL providers here: http://www.connectionstrings.com/mysql Once you connect then using MySQL is no different than any other database. Link to comment Share on other sites More sharing options...
salman.pirani Posted August 12, 2012 Author Share Posted August 12, 2012 thanks for the link but this is only showing the how to connect with data base but if i want to send any value to a specific column in mysql via asp so wht would be the code. thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted August 13, 2012 Share Posted August 13, 2012 This is how you do it if you're using ADO: http://www.w3schools.com/ado/ado_add.asp Link to comment Share on other sites More sharing options...
salman.pirani Posted August 21, 2012 Author Share Posted August 21, 2012 how can i insert the data in sql database via radio button in asp Link to comment Share on other sites More sharing options...
justsomeguy Posted August 21, 2012 Share Posted August 21, 2012 You always use an insert query like I showed to insert data. I don't know what a radio button has to do with anything. Link to comment Share on other sites More sharing options...
salman.pirani Posted August 21, 2012 Author Share Posted August 21, 2012 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><form method="post" action="demo_add.asp"><table><tr><td>CustomerID:</td><td><input name="custid"></td></tr><tr><td>Company Name:</td><td><input name="compname"></td></tr><tr><td>Contact Name:</td><td><input name="contname"></td></tr><tr><td>Address:</td><td><input name="address"></td></tr><tr><td>City:</td><td><input name="city"></td></tr><tr><td>Postal Code:</td><td><input name="postcode"></td></tr><tr><td>Country:</td><td><input name="country"></td></tr><tr> <td>gender</td> <td><label> <input type="radio" name="gender" value="m" /> </label> <label> <input type="radio" name="gender" value="f" /> </label></td></tr></table><br /><br /><input type="submit" value="Add New"><input type="reset" value="Cancel"></form></body></html>____________________________________________________<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind.mdb"%><%dim gendergender=Request.Form("gender")%><%sql="INSERT INTO customers (customerID,companyname,"sql=sql & "contactname,address,city,postalcode,country,gender)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("custid") & "',"sql=sql & "'" & Request.Form("compname") & "',"sql=sql & "'" & Request.Form("contname") & "',"sql=sql & "'" & Request.Form("address") & "',"sql=sql & "'" & Request.Form("city") & "',"sql=sql & "'" & Request.Form("postcode") & "',"sql=sql & "'" & Request.Form("country") & "')"%><%if gender="m" %><%if gender="f" %><%if gender<>"" thensql=sql & "'" & Request.Form("gender") & "')"end if on error resume nextconn.Execute sql,recaffectedif err<>0 then Response.Write("No update permissions!")else Response.Write("<h3>" & recaffected & " record added</h3>")end ifconn.close%></table></body></html> Link to comment Share on other sites More sharing options...
salman.pirani Posted August 21, 2012 Author Share Posted August 21, 2012 above are the codes which am using, kindly confirm where am making mistakes. thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted August 21, 2012 Share Posted August 21, 2012 What's the point of this: <%if gender="m" %><%if gender="f" %> You have 8 fields listed here: sql="INSERT INTO customers (customerID,companyname,"sql=sql & "contactname,address,city,postalcode,country,gender)" That means you need 8 values also. If you list the gender field, then you need a value for it. So you always need a value for gender, which means you should remove the if statement before you add gender and add it like any other field. You also have a closing parenthesis after the country value, that's an error. Link to comment Share on other sites More sharing options...
salman.pirani Posted August 22, 2012 Author Share Posted August 22, 2012 thnx sir it worked out am working on a form and its related with above mention query plz guid me with the codes its creating error________________________________________________________________________________________ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><style type="text/css"><!--.heading {font-size: 24px;}--></style></head><body><blockquote> </blockquote><form action="post.asp" method="post"><table width="938" height="215" border="0" align="center"> <tr> <td colspan="8" class="heading"><p align="center"><strong>The Aga Khan University</strong></p> <p> </p> <p align="center"><strong>Training Impact Form</strong><strong> </strong></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td width="228" colspan="2">Programme Title:<label></label> </td> <td><label> <input type="text" name="p_title" /> </label></td> <td colspan="2">Date: <label> <input type="text" name="p_date" /> </label></td> <td colspan="2">Department: <input type="text" name="department" /></td> </tr> <tr> <td colspan="8"><p align="right"><strong></strong></p></td> </tr> <tr> <td colspan="2"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td colspan="2"> </td> </tr> <tr> <td>Supervisor’s Name: </td> <td><input type="text" name="s_name" /></td> <td colspan="2">Supervisor’s Email: <input type="text" name="s_email" /></td> <td colspan="2">Supervisor’s Ext:</td> <td colspan="2"><input type="text" name="s_ext" /></td> </tr> <tr> <td colspan="6"> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="8"><p><em>To be filled by Participant’s immediate supervisor (at least) a month after the training to documen</em></p> <p><em>t any change in employee's knowledge, skills or attitudes as a result of the training:</em></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="8"><p>Rate the following questions from 1 to 5:</p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="8"><p><strong>(5-Strongly Agree 90 %, 4 - Agree 80 % , 3 - Somewhat Agree 70%, 2-Disagree 60% and 1- Strongly Disagree 50%) </strong></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="3">Q1. Did you see any change as a result of training in employees’ </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3">Knowledge</td> <td width="89"><label> <input type="radio" name="q1a" value="q1a5" /> </label></td> <td width="74"><label> <input type="radio" name="q1a" value="q1a4" /> </label></td> <td width="72"><label> <input type="radio" name="q1a" value="q1a3" /> </label></td> <td width="65"><label> <input type="radio" name="q1a" value="q1a2" /> </label></td> <td width="212"><label> <input type="radio" name="q1a" value="q1a1" /> </label></td> </tr> <tr> <td colspan="3">Skills</td> <td><label> <input type="radio" name="q1b" value="q1b5" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b4" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b3" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b2" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b1" /> </label></td> </tr> <tr> <td colspan="3">Attitude </td> <td><label> <input type="radio" name="q1c" value="q1c5" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c4" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c3" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c2" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c1" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3"><p>Q2. Are you satisfied with the employee’s overall performance specific to the training need addressed in the programme?</p></td> <td><label> <input type="radio" name="q2" value="q25" /> </label></td> <td><label> <input type="radio" name="q2" value="q24" /> </label></td> <td><label> <input type="radio" name="q2" value="q23" /> </label></td> <td><label> <input type="radio" name="q2" value="q22" /> </label></td> <td><label> <input type="radio" name="q2" value="q21" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3"><p>Q3. Did the employee perform differently on the job as a result of this programme?</p></td> <td><label> <input type="radio" name="q3" value="q35" /> </label></td> <td><label> <input type="radio" name="q3" value="q34" /> </label></td> <td><label> <input type="radio" name="q3" value="q33" /> </label></td> <td><label> <input type="radio" name="q3" value="q32" /> </label></td> <td><label> <input type="radio" name="q3" value="q31" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8"><strong>(5-Strongly Agree 50 %, 4 - Agree 60% , 3-Somewhat Agree 70 %, 2 -Disagree 80 % and 1-Strongly Disagree 90 %) </strong></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3">Q4. Does the employee require further training in this area? </td> <td><label> <input type="radio" name="q4" value="q45" /> </label></td> <td><label> <input type="radio" name="q4" value="q44" /> </label></td> <td><label> <input type="radio" name="q4" value="q43" /> </label></td> <td><label> <input type="radio" name="q4" value="q42" /> </label></td> <td><label> <input type="radio" name="q4" value="q41" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8"><blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <p>Q5. Any other comments? </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote></td> </tr> <tr> <td colspan="8"><label> <textarea name="any_c" cols="100" rows="20"></textarea> </label></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="2">Participant's Name : <label> <input type="text" name="p_name"/> </label></td> <td>Employee ID: <label> <input type="text" name="emid"/> </label></td> <td>Ext : <label> <input type="text" name="ext"/> </label></td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8">16</td> </tr></table><input name="submit" type="submit" value="Done" /><input name="reset" type="reset" /></form></body></html> __________________________________________________________________________________________________ <%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind.mdb"%><%sql="INSERT INTO customers (Programme Title,Date,"sql=sql & "Department,Supervisor’s Name,Supervisor’s Email,Supervisor’s Ext,Q1a,Q1b,Q1c,Q2,Q3,Q4,Q5,Participant's Name,Employee ID,Ext)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("p_title") & "',"sql=sql & "'" & Request.Form("p_date") & "',"sql=sql & "'" & Request.Form("department") & "',"sql=sql & "'" & Request.Form("s_name") & "',"sql=sql & "'" & Request.Form("s_email") & "',"sql=sql & "'" & Request.Form("s_ext") & "',"sql=sql & "'" & Request.Form("q1a") & "',"sql=sql & "'" & Request.Form("q1b") & "',"sql=sql & "'" & Request.Form("q1c") & "',"sql=sql & "'" & Request.Form("q2") & "',"sql=sql & "'" & Request.Form("q3") & "',"sql=sql & "'" & Request.Form("q4") & "',"sql=sql & "'" & Request.Form("any_c") & "',"sql=sql & "'" & Request.Form("p_name") & "',"sql=sql & "'" & Request.Form("emid") & "',"sql=sql & "'" & Request.Form("ext") & "')" on error resume nextconn.Execute sql,recaffectedif err<>0 then Response.Write("No update permissions!")else Response.Write("<h3>" & recaffected & " record added</h3>")end ifconn.close%></body></html> Link to comment Share on other sites More sharing options...
salman.pirani Posted August 22, 2012 Author Share Posted August 22, 2012 i have made some change now its working but not properly kindly let me knw now where am making the mistake____________________________________________________________________________________________________ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><style type="text/css"><!--.heading {font-size: 24px;}--></style></head><body><blockquote> </blockquote><form action="post.asp" method="post"><table width="938" height="215" border="0" align="center"> <tr> <td colspan="8" class="heading"><p align="center"><strong>The Aga Khan University</strong></p> <p> </p> <p align="center"><strong>Training Impact Form</strong><strong> </strong></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td width="228" colspan="2">Programme Title:<label></label> </td> <td><label> <input type="p_title"/> </label></td> <td colspan="2">Date: <label> <input type="p_date" /> </label></td> <td colspan="2">Department: <input type="department" /></td> </tr> <tr> <td colspan="8"><p align="right"><strong></strong></p></td> </tr> <tr> <td colspan="2"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td colspan="2"> </td> </tr> <tr> <td>Supervisor’s Name: </td> <td><input type="s_name" /></td> <td colspan="2">Supervisor’s Email: <input type="s_email" /></td> <td colspan="2">Supervisor’s Ext:</td> <td colspan="2"><input type="s_ext" /></td> </tr> <tr> <td colspan="6"> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="8"><p><em>To be filled by Participant’s immediate supervisor (at least) a month after the training to documen</em></p> <p><em>t any change in employee's knowledge, skills or attitudes as a result of the training:</em></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="8"><p>Rate the following questions from 1 to 5:</p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="8"><p><strong>(5-Strongly Agree 90 %, 4 - Agree 80 % , 3 - Somewhat Agree 70%, 2-Disagree 60% and 1- Strongly Disagree 50%) </strong></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="3">Q1. Did you see any change as a result of training in employees’ </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3">Knowledge</td> <td width="89"><label> <input type="radio" name="q1a" value="q1a5" /> </label></td> <td width="74"><label> <input type="radio" name="q1a" value="q1a4" /> </label></td> <td width="72"><label> <input type="radio" name="q1a" value="q1a3" /> </label></td> <td width="65"><label> <input type="radio" name="q1a" value="q1a2" /> </label></td> <td width="212"><label> <input type="radio" name="q1a" value="q1a1" /> </label></td> </tr> <tr> <td colspan="3">Skills</td> <td><label> <input type="radio" name="q1b" value="q1b5" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b4" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b3" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b2" /> </label></td> <td><label> <input type="radio" name="q1b" value="q1b1" /> </label></td> </tr> <tr> <td colspan="3">Attitude </td> <td><label> <input type="radio" name="q1c" value="q1c5" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c4" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c3" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c2" /> </label></td> <td><label> <input type="radio" name="q1c" value="q1c1" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3"><p>Q2. Are you satisfied with the employee’s overall performance specific to the training need addressed in the programme?</p></td> <td><label> <input type="radio" name="q2" value="q25" /> </label></td> <td><label> <input type="radio" name="q2" value="q24" /> </label></td> <td><label> <input type="radio" name="q2" value="q23" /> </label></td> <td><label> <input type="radio" name="q2" value="q22" /> </label></td> <td><label> <input type="radio" name="q2" value="q21" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3"><p>Q3. Did the employee perform differently on the job as a result of this programme?</p></td> <td><label> <input type="radio" name="q3" value="q35" /> </label></td> <td><label> <input type="radio" name="q3" value="q34" /> </label></td> <td><label> <input type="radio" name="q3" value="q33" /> </label></td> <td><label> <input type="radio" name="q3" value="q32" /> </label></td> <td><label> <input type="radio" name="q3" value="q31" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8"><strong>(5-Strongly Agree 50 %, 4 - Agree 60% , 3-Somewhat Agree 70 %, 2 -Disagree 80 % and 1-Strongly Disagree 90 %) </strong></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3">Q4. Does the employee require further training in this area? </td> <td><label> <input type="radio" name="q4" value="q45" /> </label></td> <td><label> <input type="radio" name="q4" value="q44" /> </label></td> <td><label> <input type="radio" name="q4" value="q43" /> </label></td> <td><label> <input type="radio" name="q4" value="q42" /> </label></td> <td><label> <input type="radio" name="q4" value="q41" /> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8"><blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <p>Q5. Any other comments? </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote></td> </tr> <tr> <td colspan="8"><label> <textarea name="any_c" cols="100" rows="20"></textarea> </label></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="2">Participant's Name : <label> <input type="p_name"/> </label></td> <td>Employee ID: <label> <input type="emid"/> </label></td> <td>Ext : <label> <input type="ext"/> </label></td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8">16</td> </tr></table><input name="submit" type="submit" value="Done" /><input name="reset" type="reset" /></form></body></html>_______________________________________________<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind.mdb"%><%sql="INSERT INTO customers (ProgrammeTitle,Date,"sql=sql & "Department,SupervisorsName,SupervisorsEmail,SupervisorsExt,Q1a,Q1b,Q1c,Q2,Q3,Q4,Q5,ParticipantsName,EmployeeID,Ext)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("p_title") & "',"sql=sql & "'" & Request.Form("p_date") & "',"sql=sql & "'" & Request.Form("department") & "',"sql=sql & "'" & Request.Form("s_name") & "',"sql=sql & "'" & Request.Form("s_email") & "',"sql=sql & "'" & Request.Form("s_ext") & "',"sql=sql & "'" & Request.Form("q1a") & "',"sql=sql & "'" & Request.Form("q1b") & "',"sql=sql & "'" & Request.Form("q1c") & "',"sql=sql & "'" & Request.Form("q2") & "',"sql=sql & "'" & Request.Form("q3") & "',"sql=sql & "'" & Request.Form("q4") & "',"sql=sql & "'" & Request.Form("any_c") & "',"sql=sql & "'" & Request.Form("p_name") & "',"sql=sql & "'" & Request.Form("emid") & "',"sql=sql & "'" & Request.Form("ext") & "')"on error resume nextconn.Execute sql,recaffectedif err<>0 then Response.Write("No update permissions!")else Response.Write("<h3>" & recaffected & " record added</h3>")end ifconn.close%></body></html> Link to comment Share on other sites More sharing options...
salman.pirani Posted August 22, 2012 Author Share Posted August 22, 2012 really need ur help Link to comment Share on other sites More sharing options...
justsomeguy Posted August 22, 2012 Share Posted August 22, 2012 I don't know what "not working properly" means, you need to say what it is doing or not doing. If you're getting an error message then post the error message. And what's with all the blockquotes? Are you sure you have enough? Link to comment Share on other sites More sharing options...
salman.pirani Posted August 23, 2012 Author Share Posted August 23, 2012 actually its generaing this error "No update permissions!" after making the changes in the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><style type="text/css"><!--.heading {font-size: 24px;}--></style></head><body><blockquote> </blockquote><form action="post.asp" method="post"><table width="938" height="215" border="0" align="center"> <tr> <td colspan="8" class="heading"><p align="center"><strong>The Aga Khan University</strong></p> <p> </p> <p align="center"><strong>Training Impact Form</strong><strong> </strong></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td width="228" colspan="2">Programme Title:<label></label> </td> <td><label> <input type="ptitle"/> </label></td> <td colspan="2">Date: <label> <input type="pdate"/> </label></td> <td colspan="2">Department: <input type="department"/></td> </tr> <tr> <td colspan="8"><p align="right"><strong></strong></p></td> </tr> <tr> <td colspan="2"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td colspan="2"> </td> </tr> <tr> <td>Supervisor’s Name: </td> <td><input type="sname"/></td> <td colspan="2">Supervisor’s Email: <input type="semail"/></td> <td colspan="2">Supervisor’s Ext:</td> <td colspan="2"><input type="sext"/></td> </tr> <tr> <td colspan="6"> </td> <td colspan="2"> </td> </tr> <tr> <td colspan="8"><p><em>To be filled by Participant’s immediate supervisor (at least) a month after the training to documen</em></p> <p><em>t any change in employee's knowledge, skills or attitudes as a result of the training:</em></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="8"><p>Rate the following questions from 1 to 5:</p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="8"><p><strong>(5-Strongly Agree 90 %, 4 - Agree 80 % , 3 - Somewhat Agree 70%, 2-Disagree 60% and 1- Strongly Disagree 50%) </strong></p></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="3">Q1. Did you see any change as a result of training in employees’ </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3">Knowledge</td> <td width="89"><label> <input type="radio" name="q1a" value="5"/> </label></td> <td width="74"><label> <input type="radio" name="q1a" value="4"/> </label></td> <td width="72"><label> <input type="radio" name="q1a" value="3"/> </label></td> <td width="65"><label> <input type="radio" name="q1a" value="2"/> </label></td> <td width="212"><label> <input type="radio" name="q1a" value="1"/> </label></td> </tr> <tr> <td colspan="3">Skills</td> <td><label> <input type="radio" name="q1b" value="5"/> </label></td> <td><label> <input type="radio" name="q1b" value="4"/> </label></td> <td><label> <input type="radio" name="q1b" value="3"/> </label></td> <td><label> <input type="radio" name="q1b" value="2"/> </label></td> <td><label> <input type="radio" name="q1b" value="1"/> </label></td> </tr> <tr> <td colspan="3">Attitude </td> <td><label> <input type="radio" name="q1c" value="5"/> </label></td> <td><label> <input type="radio" name="q1c" value="4"/> </label></td> <td><label> <input type="radio" name="q1c" value="3"/> </label></td> <td><label> <input type="radio" name="q1c" value="2"/> </label></td> <td><label> <input type="radio" name="q1c" value="1"/> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3"><p>Q2. Are you satisfied with the employee’s overall performance specific to the training need addressed in the programme?</p></td> <td><label> <input type="radio" name="q2" value="5"/> </label></td> <td><label> <input type="radio" name="q2" value="4"/> </label></td> <td><label> <input type="radio" name="q2" value="3"/> </label></td> <td><label> <input type="radio" name="q2" value="2"/> </label></td> <td><label> <input type="radio" name="q2" value="1"/> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3"><p>Q3. Did the employee perform differently on the job as a result of this programme?</p></td> <td><label> <input type="radio" name="q3" value="5"/> </label></td> <td><label> <input type="radio" name="q3" value="4"/> </label></td> <td><label> <input type="radio" name="q3" value="3"/> </label></td> <td><label> <input type="radio" name="q3" value="2"/> </label></td> <td><label> <input type="radio" name="q3" value="1"/> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8"><strong>(5-Strongly Agree 50 %, 4 - Agree 60% , 3-Somewhat Agree 70 %, 2 -Disagree 80 % and 1-Strongly Disagree 90 %) </strong></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="3">Q4. Does the employee require further training in this area? </td> <td><label> <input type="radio" name="q4" value="5"/> </label></td> <td><label> <input type="radio" name="q4" value="4"/> </label></td> <td><label> <input type="radio" name="q4" value="3"/> </label></td> <td><label> <input type="radio" name="q4" value="2"/> </label></td> <td><label> <input type="radio" name="q4" value="1"/> </label></td> </tr> <tr> <td colspan="3"> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8"><blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <blockquote> <p>Q5. Any other comments? </p> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote> </blockquote></td> </tr> <tr> <td colspan="8"><label> <textarea name="anyc" cols="100" rows="20"></textarea> </label></td> </tr> <tr> <td colspan="8"> </td> </tr> <tr> <td colspan="2">Participant's Name : <label> <input type="pname"/> </label></td> <td>Employee ID: <label> <input type="emid"/> </label></td> <td>Ext : <label> <input type="ext"/> </label></td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="8">16</td> </tr></table><input name="submit" type="submit" value="Done" /><input name="reset" type="reset" /></form></body></html>___________________________________________________<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><%set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open "c:/webdata/northwind.mdb"%><%sql="INSERT INTO customers (programmetitle,date,"sql=sql &"department,supervisorsname,supervisorsemail,supervisorsext,q1a,q1b,q1c,q2,q3,q4,q5,participantsname,employeeid,ext)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("ptitle") & "',"sql=sql & "'" & Request.Form("pdate") & "',"sql=sql & "'" & Request.Form("department") & "',"sql=sql & "'" & Request.Form("sname") & "',"sql=sql & "'" & Request.Form("semail") & "',"sql=sql & "'" & Request.Form("sext") & "',"sql=sql & "'" & Request.Form("q1a") & "',"sql=sql & "'" & Request.Form("q1b") & "',"sql=sql & "'" & Request.Form("q1c") & "',"sql=sql & "'" & Request.Form("q2") & "',"sql=sql & "'" & Request.Form("q3") & "',"sql=sql & "'" & Request.Form("q4") & "',"sql=sql & "'" & Request.Form("anyc") & "',"sql=sql & "'" & Request.Form("pname") & "',"sql=sql & "'" & Request.Form("emid") & "',"sql=sql & "'" & Request.Form("ext") & "')"on error resume nextconn.Execute sql,recaffectedif err<>0 then Response.Write("No update permissions!")else Response.Write("<h3>" & recaffected & " record added</h3>")end ifconn.close%></body></html> Link to comment Share on other sites More sharing options...
justsomeguy Posted August 23, 2012 Share Posted August 23, 2012 If you're checking the err variable to see if there was an error, and there was, then you should print the value of err so that you can look up what the problem is. Link to comment Share on other sites More sharing options...
salman.pirani Posted August 23, 2012 Author Share Posted August 23, 2012 can u plz specify what code should i use to show the error Link to comment Share on other sites More sharing options...
justsomeguy Posted August 23, 2012 Share Posted August 23, 2012 Instead of this: if err<>0 thenResponse.Write("No update permissions!") since you don't really know that the error means that you don't have permission, it makes sense to print out the actual error. if err<>0 then Response.Write("Error code " & err) Link to comment Share on other sites More sharing options...
salman.pirani Posted August 23, 2012 Author Share Posted August 23, 2012 now it is giving this Error code -2147217900 Link to comment Share on other sites More sharing options...
salman.pirani Posted August 23, 2012 Author Share Posted August 23, 2012 whts is this about Link to comment Share on other sites More sharing options...
justsomeguy Posted August 23, 2012 Share Posted August 23, 2012 If you search for that error code: http://www.google.co...iw=1538&bih=816 it looks like it means you don't have a valid SQL statement. You should print out the SQL statement after you build it to see what you're sending to the database. The problem might be that "date" is a reserved word in Access: http://support.microsoft.com/kb/286335 According to that article if you're using a reserved word as a name you need to surround it with square brackets. I thought you were trying to use MySQL though, not Access. Link to comment Share on other sites More sharing options...
salman.pirani Posted August 25, 2012 Author Share Posted August 25, 2012 am using acces as mention in w3 school tuto so sould i chnage the name date ? or wht should i do now Link to comment Share on other sites More sharing options...
salman.pirani Posted August 25, 2012 Author Share Posted August 25, 2012 now am geting this Error code -2147217913 Link to comment Share on other sites More sharing options...
justsomeguy Posted August 27, 2012 Share Posted August 27, 2012 That means you're not using the right data type in the query. I looked that error up online, you can do the same. http://www.google.com/search?client=opera&rls=en&q=ado+Error+code+-2147217913=7ac3b7c0eb5cf6ea&biw=1538&bih=816 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now