Reply
What might this error mean?
Old 02-07-2008, 03:54 PM What might this error mean?
Super Talker

Posts: 116


Can you help me determine what this error might mean?
Thanks.

"Microsoft OLE DB Provider for SQL Servererror '80040e14'
Line 1: Incorrect syntax near '='. /Mhome1/_register_2.asp, line 60"

Here are lines 56 through 70:

Code:
SQL = "SELECT * FROM mms_tbl_membershipType WHERE ID = " & Trim( request( "MType" ) )
    Set RS = Server.CreateObject("ADODB.Recordset")
    RS.LockType   = 1
    RS.CursorType = 0
    RS.Open SQL, MyConn
      IF NOT RS.EOF THEN
      MMS_PP_ALLOW = 1
      MMS_PP_G_ID  = trim(RS("fldPPMemberID"))
      MMS_PP_CUR = trim(RS("fldCurrency"))
      MMS_PP_NAME = trim(RS("fldMName"))
      MMS_PP_ID = trim(RS("ID"))
      MMS_PP_COST = trim(RS("fldCost"))
      END IF
    RS.Close
    Set RS = Nothing
chrisj is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 02-07-2008, 06:33 PM Re: What might this error mean?
chrishirst's Avatar
Super Moderator

Posts: 11,894
Location: Blackpool. UK
write the actual value of SQL to screen and you'll probably see where the error is.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-07-2008, 06:44 PM Re: What might this error mean?
Super Talker

Posts: 116
Thank you for your reply/assistance.

I don't know how to "write the actual value of SQL to screen". Can you tell me how, please?

Thanks again.
chrisj is offline
Reply With Quote
View Public Profile
 
Old 02-07-2008, 07:22 PM Re: What might this error mean?
chrishirst's Avatar
Super Moderator

Posts: 11,894
Location: Blackpool. UK
debugging101

response.write SQL
response.end

will print the concatenated string value to screen and stop the script from processing the error line
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-07-2008, 10:32 PM Re: What might this error mean?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,945
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
It means that request("MType") is null.

You really should make sure that request("MType") is a number. You'll end up with some problems (such as this one) if you don't. The best way to do that is to assign Request ("MType") to a variable and then convert it to a number.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to What might this error mean?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14999 seconds with 13 queries