Many tutorials kinda neglect to mention this to any detail.
But at some point your going to come accross a 80040e14 error - Syntax error in INSERT INTO statement.
Reserved name fields.
heres a link for more info on Macromedia
http://www.macromedia.com/support/ultradev/ts/documents/insert_into.htm
Now you could spend lots of time trying to pick and place what words you can use - or get into a habit early and start a naming convention.
Here is what I do.
Any database's I start with db like dbChase
any database tables I start with tbl like tblUsers
any database table fields I start with fld like fldFirstName
any database queries I start with qry like qryUsers
In any form fields I start with txt like txtFirstName
any Sessions I start with sv like svFirstName
any Dim's I start with str like strFirstName
it takes a little to get used too - but once you do - its much much easier. look at below code I will write, see if you can spot where they are residing - and what they are.
[color navy]
<%
Dim strFirstName
strFirstName = request.form("txtFirstName")
rsTemp = "SELECT * from tblUsers where fldUserName='" & strFirstName & " ORDER BY Session("svLastName") & " DESC"
%>[/color]
not a complete recordset, but see where everything is?
I'm getting strFirstName by populating it from a form text field named txtFirstName,
my SQL Statement says to take every record from table Users where the username = the first name populated earlier into strFirstName - then order by last name.
Not only is it much easier to keep track of - you never run into reserved names again.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.