Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Can you help me with this error, please...
Old 02-14-2008, 12:25 PM Can you help me with this error, please...
Extreme Talker

Posts: 216
Trades: 0
Could you please help me remedy this error?


Microsoft OLE DB Provider for SQL Servererror '80040e14'
Line 1: Incorrect syntax near '='. /home/reactivate.asp, line 17


I believe line 17 is: MyConn.Execute uSQL

Code:
<!--#include file="app_config.asp"-->
<!--#include file="inc_header.asp"-->
<%
MType   = Trim( request( "MType" ) )
IF MType = 0 THEN 
 sMESSAGE = sMESSAGE & "<li />You did not select a valid MEMBERSHIP TYPE"
 %><!--#include file="inc_error.asp"--><%
ELSE
 Call OPEN_DB()
 
 '// UPDATE USER ACCOUNT STATUS ( to Unpaid Account )
 uSQL = "UPDATE mms_tbl_user " &_
     "SET fldSTATUS = '" & Cstr(drpSTATUS(5)) & "' " &_
     "WHERE ID = " & session( "sUSER_ID" ) 
 MyConn.Execute uSQL
 dSQL = "DELETE from mms_tbl_user_membershipType " &_
     "WHERE fldUSER_ID = " & session( "sUSER_ID" ) 
 MyConn.Execute dSQL
 
 cSQL = "DELETE from mms_tbl_user_cate " &_
     "WHERE fldUSER_ID = " & session( "sUSER_ID" ) 
 MyConn.Execute cSQL
 
 set cRS = MyConn.Execute( "SELECT * FROM mms_tbl_membershipType_cate WHERE fldMembershipType_ID = " & MTYPE )
 while not cRS.EOF
  MyConn.Execute( "INSERT INTO mms_tbl_user_cate (fldCATE_ID, fldUSER_ID)" &_
      "VALUES (" & cRS( "fldCATE_ID" ) & ", " & session( "sUSER_ID" ) & ")" )
 cRS.MoveNext
    wend
 '// DEFINE MEMBERSHIP LEVEL ASSIGNMENT
 mSQL = "INSERT INTO mms_tbl_user_membershipType (fldMType_ID, fldUSER_ID)" &_
     "VALUES (" & MType & ", " & session( "sUSER_ID" ) & ")" 
 MyConn.Execute mSQL
 MyConn.Close
 Set MyConn = Nothing
 Session.Timeout = 25
 Response.Redirect "_register_2.asp?p=" & PAYMENT & "&MType=" & MType
 Response.End
END IF
%>
chrisj is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-14-2008, 04:23 PM Re: Can you help me with this error, please...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
as we keep saying to you

Print the SQL string to screen and LOOK at it

If you can't work what is wrong from it, post the SQL NOT the ASP code
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-25-2008, 01:31 PM Re: Can you help me with this error, please...
Extreme Talker

Posts: 216
Trades: 0
I worked through the error and have another one:

Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near '='.
/home/register_2.asp, line 80

I added:

response.write(sql)
response.end

before line 80

and this is what now shows instead of the error:

SELECT fldSINCE, fldEXPIRES, fldUNIT FROM mms_tbl_user WHERE ID =

I don't know what to do next with this information. Can you help me please?
Thanks
chrisj is offline
Reply With Quote
View Public Profile
 
Old 02-25-2008, 02:11 PM Re: Can you help me with this error, please...
Skilled Talker

Posts: 97
Name: Ganesh
Trades: 0
Quote:
Originally Posted by chrisj View Post
I worked through the error and have another one:

Microsoft OLE DB Provider for SQL Server error '80040e14'
Line 1: Incorrect syntax near '='.
/home/register_2.asp, line 80

I added:

response.write(sql)
response.end

before line 80

and this is what now shows instead of the error:

SELECT fldSINCE, fldEXPIRES, fldUNIT FROM mms_tbl_user WHERE ID =

I don't know what to do next with this information. Can you help me please?
Thanks
Chris,

From what i see:

Response.Redirect "_register_2.asp?p=" & PAYMENT & "&MType=" & MType


Either PAYMENT or MType is passed empty into the _register_2.asp file.

You can either add a condition to check to make sure it is not going empty or handle the empty value to a default and use it in the query.
__________________
Gather. Search. Compare. Save on Hotel and Flight Prices @
Please login or register to view this content. Registration is FREE
sri_gan is offline
Reply With Quote
View Public Profile
 
Old 02-25-2008, 02:33 PM Re: Can you help me with this error, please...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
look at the end end the printed out string!

do you see a value for ID ??

No?

good!

because neither does the SQL server
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-29-2008, 12:06 AM Re: Can you help me with this error, please...
Extreme Talker

Posts: 216
Trades: 0
Thank you both for your expert conclusions.
I greatly appreciate it.

If I knew how to "add a condition to check to make sure it is not going empty or handle the empty value to a default and use it in the query" I would do it. But I don't know how to do that to remedy this.

Any help would be greatly appreciated. Feel free to contact me offline if your guidance would involve more than replying by post. Thank you.
chrisj is offline
Reply With Quote
View Public Profile
 
Old 02-29-2008, 03:49 AM Re: Can you help me with this error, please...
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Code:
if [insert_variable] <> ["" for strings] then 
     do something here because it is populated
else
     do something else because it is empty
end if
the [ ... ] parts are NOT literals it is simply a placeholder for you to insert YOUR values.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-04-2008, 06:43 PM Re: Can you help me with this error, please...
Extreme Talker

Posts: 216
Trades: 0
Thanks for your help. i appreciate it.
chrisj is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Can you help me with this error, please...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.39380 seconds with 12 queries