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

Web Development

 
GeneralRe: How do I query for an element's size in Javascript? Pin
Dave Calkins7-Dec-07 17:30
Dave Calkins7-Dec-07 17:30 
GeneralRe: How do I query for an element's size in Javascript? Pin
Shog96-Dec-07 9:57
sitebuilderShog96-Dec-07 9:57 
GeneralRe: How do I query for an element's size in Javascript? Pin
Dave Calkins7-Dec-07 17:29
Dave Calkins7-Dec-07 17:29 
GeneralTime zone problem with fat client and web service Pin
Member 27969975-Dec-07 11:30
Member 27969975-Dec-07 11:30 
GeneralRe: Time zone problem with fat client and web service Pin
Michael Sync5-Dec-07 16:00
Michael Sync5-Dec-07 16:00 
GeneralLOGIN SCRITP Pin
solarthur015-Dec-07 8:17
solarthur015-Dec-07 8:17 
GeneralRe: LOGIN SCRITP Pin
Michael Sync5-Dec-07 15:59
Michael Sync5-Dec-07 15:59 
Generalfile downloading Pin
choorakkuttyil5-Dec-07 1:46
choorakkuttyil5-Dec-07 1:46 
GeneralRe: file downloading Pin
Michael Sync5-Dec-07 15:55
Michael Sync5-Dec-07 15:55 
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

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.