#1
  1. Contributing User
    ASP Explorer (0 - 99 posts)

    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
  3. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    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
  4. #3
  5. Contributing User
    ASP Explorer (0 - 99 posts)

    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
  6. #4
  7. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,126
    Rep Power
    2921
    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.
  8. #5
  9. Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jun 2008
    Location
    Hottest spot caused by Global Warming
    Posts
    65
    Rep Power
    6
    Sure I'll get back to you

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

IMN logo majestic logo threadwatch logo seochat tools logo