Click here to Skip to main content
15,898,134 members
Home / Discussions / Web Development
   

Web Development

 
GeneralWindow.open Maximise/Minimise Pin
tonymathewt5-Dec-07 0:45
professionaltonymathewt5-Dec-07 0:45 
GeneralRe: Window.open Maximise/Minimise Pin
Shog96-Dec-07 10:04
sitebuilderShog96-Dec-07 10:04 
GeneralRe: Window.open Maximise/Minimise Pin
tonymathewt11-Dec-07 2:43
professionaltonymathewt11-Dec-07 2:43 
Generalvalid email Pin
trilokharry4-Dec-07 22:15
trilokharry4-Dec-07 22:15 
GeneralRe: valid email Pin
Michael Sync5-Dec-07 15:51
Michael Sync5-Dec-07 15:51 
GeneralChnaging language depending upon country choose in the PC - HTML Pin
Amjath Rahman4-Dec-07 17:23
Amjath Rahman4-Dec-07 17:23 
GeneralRe: Chnaging language depending upon country choose in the PC - HTML Pin
Michael Sync5-Dec-07 15:41
Michael Sync5-Dec-07 15:41 
GeneralGo to the speciifed text Pin
jebin k3-Dec-07 21:10
jebin k3-Dec-07 21:10 
GeneralRe: Go to the speciifed text Pin
Johnny ²4-Dec-07 11:54
Johnny ²4-Dec-07 11:54 
Generalresize web page 'n' menu control Pin
trilokharry3-Dec-07 18:18
trilokharry3-Dec-07 18:18 
GeneralRe: resize web page 'n' menu control Pin
Vasudevan Deepak Kumar4-Dec-07 21:50
Vasudevan Deepak Kumar4-Dec-07 21:50 
Generalcaching problem with IE Pin
JimmyRopes3-Dec-07 16:23
professionalJimmyRopes3-Dec-07 16:23 
Generalto chek the input data is string or integer Pin
idsanjeevjha3-Dec-07 16:12
idsanjeevjha3-Dec-07 16:12 
GeneralRe: to chek the input data is string or integer Pin
Michael Sync5-Dec-07 15:13
Michael Sync5-Dec-07 15:13 
GeneralRe: to chek the input data is string or integer Pin
Sathesh Sakthivel5-Dec-07 18:11
Sathesh Sakthivel5-Dec-07 18:11 
QuestionInsert Statement error Pin
Paul McGann1-Dec-07 5:57
professionalPaul McGann1-Dec-07 5:57 
I have an asp file linked to a html file with the following code:

<%
Dim rs, conn
set conn = Server.CreateObject("ADODB.connection")
set rs = Server.CreateObject("ADODB.Recordset")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("obesity.mdb"))

age = request("age")
gender = request("gender")
height = request("height")
weight = request("weight")
waist = request("waist")

sqlstring = "Insert INTO User ([Age], [Gender], [Height], [Weight], [Waist]) Values(" & age & ",'" & gender & "'," & height & "," & weight & "," & waist & ")"

rs.Open sqlstring, conn

sqlstring = "Select * From User Order By age"

rs.Open sqlstring, conn

Response.Write "<TABLE BORDER=0><TR><TD width=100><u><strong>age</strong></u></TD><TD width=100><u><strong>Gender</strong></u></TD><TD width=100><u><strong>Height</strong></u></TD><TD width=100><u><strong>Weight</strong></u></TD><TD width=100><u><strong>Waist</strong></u></TD></TR><TR>"

while not rs.EOF
Response.Write "<TD width=100>" & rs("age") & "</TD>"
Response.Write "<TD width=100>" & rs("gender") & "</TD>"
Response.Write "<TD width=100>" & rs("height") & "</TD>"
Response.Write "<TD width=100>" & rs("weight") & "</TD>"
Response.Write "<TD width=100>" & rs("waist") & "</TD>"
Response.Write "</TR>"
rs.MoveNext
wend

Response.Write "</TABLE>"
rs.Close
%>

When ever i execute this however it comes up with the following error message:

Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.

If anyone can spot where I'm going wrong can you let me know. The table in the database looks as follows:

Age - number
Gender - text
Height - number
Weight - number
Waist - number

Thank You
AnswerRe: Insert Statement error Pin
Guffa1-Dec-07 6:28
Guffa1-Dec-07 6:28 
GeneralRe: Insert Statement error Pin
Paul McGann1-Dec-07 6:32
professionalPaul McGann1-Dec-07 6:32 
GeneralRe: Insert Statement error Pin
Shog91-Dec-07 10:49
sitebuilderShog91-Dec-07 10:49 
AnswerRe: Insert Statement error Pin
Paul Conrad1-Dec-07 9:54
professionalPaul Conrad1-Dec-07 9:54 
QuestionQuestion : Pin
sandeep_n1-Dec-07 3:23
sandeep_n1-Dec-07 3:23 
AnswerAnswer : Pin
Guffa1-Dec-07 5:46
Guffa1-Dec-07 5:46 
AnswerRe: Question : Pin
Paul Conrad1-Dec-07 9:55
professionalPaul Conrad1-Dec-07 9:55 
QuestionRegular Expression [modified] Pin
ganeshMohan1-Dec-07 1:01
ganeshMohan1-Dec-07 1:01 
AnswerRe: Regular Expression Pin
pmarfleet1-Dec-07 2:37
pmarfleet1-Dec-07 2:37 

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.