Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: Incorrect syntax near the keyword 'null'.

Results 1 to 5 of 5
Share This Thread →
  1. #1
    PhloooooIsFlo's Avatar
    PhloooooIsFlo is offline Contributing User
    Join Date
    Jun 2008
    Location
    Hottest spot caused by Global Warming
    Posts
    65
    Rep Power
    6

    Incorrect syntax near the keyword 'null'.

    Hi all... I'm newbie here in this forum and in ASP programming either Well, as I said before, I'm new in ASP programming, and I have to continue the code. When I compile the program, occur the following error :

    Error Type:
    Microsoft OLE DB Provider for SQL Server (0x80040E14)
    Incorrect syntax near the keyword 'null'.
    /Flo/ecmtest/main/index_col.asp, line 65

    And the code as below :

    Code:
    <%    
    link_view = ""
    set dicColl = server.CreateObject("Scripting.Dictionary")
    Set ADORs = Server.CreateObject("ADODB.Recordset")
    sSQL = "sp_index_coll2(null,"&user_id&")"
    ADORs.Open sSQL, go_ADOConn, 3
    if ADORs.eof then Response.Write "<br><br>Sorry, you don't have permission to view the collection"
    do while not ADORs.eof
    	col_id = ADORs("col_id")
    	col_title = ADORs("col_title")
    	Response.Write "<IMG src='../images/folder.gif' border=0>&nbsp;"
    	Response.Write "<A href='collection.asp?col_id1="&col_id&"'>"& col_title & "</A><br>"
    	call check(col_id)
    		
    	ADORs.MoveNext
    	if not ADORs.eof then Response.Write "|<br>"
    loop
    ADORs.Close
    %>
    The bold part is where the error part (line 65)

    I appreciate your help. Thank you

    -Flo

  2. #2
    Shadow Wizard's Avatar
    Shadow Wizard is offline Moderator From Beyond
    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,126
    Rep Power
    2921
    --moved to the ASP forum.
    as for your problem: your syntax for calling the SP is wrong. try this:
    Code:
    sSQL = "sp_index_coll2 '', " & user_id

  3. #3
    PhloooooIsFlo's Avatar
    PhloooooIsFlo is offline Contributing User
    Join Date
    Jun 2008
    Location
    Hottest spot caused by Global Warming
    Posts
    65
    Rep Power
    6
    Hi Shadow Wizard... thank you for replying my thread (fyuh I thought there will be nobody reply). Well, I will try it at office tomorrow morning ^_^
    And oh.. sorry if I posted this thread at the wrong place

    -Flo

  4. #4
    Shadow Wizard's Avatar
    Shadow Wizard is offline Moderator From Beyond
    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,126
    Rep Power
    2921
    Quote Originally Posted by PhloooooIsFlo
    Hi Shadow Wizard... thank you for replying my thread (fyuh I thought there will be nobody reply). Well, I will try it at office tomorrow morning ^_^
    And oh.. sorry if I posted this thread at the wrong place

    -Flo
    no problem, just keep in mind from now on that ASP questions belong
    to the ASP forum.

  5. #5
    PhloooooIsFlo's Avatar
    PhloooooIsFlo is offline Contributing User
    Join Date
    Jun 2008
    Location
    Hottest spot caused by Global Warming
    Posts
    65
    Rep Power
    6
    Sure I'll get back to you

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Query Error - Text Too Long
    By navkeshchawla in forum Microsoft Access Help
    Replies: 8
    Last Post: June 20th, 2006, 07:07 AM
  2. Compare two tables
    By aish in forum Microsoft SQL Server
    Replies: 3
    Last Post: January 27th, 2006, 07:42 AM
  3. Incorrect Syntax near keyword ORDER
    By banker in forum SQL Development
    Replies: 7
    Last Post: July 20th, 2005, 10:38 PM
  4. Addition Woes
    By Jackie W in forum ASP Development
    Replies: 19
    Last Post: April 29th, 2005, 12:30 PM
  5. ASP Problem When Posting To MySQL Database
    By wleguy in forum ASP Development
    Replies: 14
    Last Post: February 22nd, 2004, 11:49 AM

ASP Free Advertisers and Affiliates