[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:

  1. #1
    Join Date
    Jan 2006

    Exclamation [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1:

    Hi i am getting error like the below, can any one help me in this....

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.
    /railwaysproject/local/bangalore/deletetn.asp, line

    const action_add="add"
    const action_view="view"
    const action_delete="del"
    const action_edit="edit"
    const validate_yes="y"
    const norecordselected=-9999
    <LINK rel=stylesheet href=menu.css type=text/css>
    <script language=JavaScript src=content1.js></script>
    <script language=JavaScript src=menu.js></script>

    <!--#include file="database.asp"-->
    <!--#include file="adovbs.inc"-->
    'Main Processing loop
    sub main()
    dim straction
    dim blnisvalidation
    dim stn
    set objrs=server.CreateObject("adodb.recordset")
    strsql="select * from sbcswrtds where tn=" & tn
    objrs.open strsql,objconn,3,3

    <table align="center">
    <tr><td height="25"><font size=3 face="Verdana, Arial, Helvetica, sans-serif" color="blue"><b>Are you sure to delete "<%=objrs("tn")%>"</b></font></td></tr>

    <form name="form1" method=post action="deletetn1.asp" onSubmit="return validate();" >
    <table align="center">
    <td height="80">
    <input type="submit" name="submit1" value="Delete" ></td></tr>

    end sub
    'Code begins executing here
    call main

    Last edited by thirulok; 01-25-2006 at 02:28 AM. Reason: Wrong title given

  2. #2
    Join Date
    Dec 2003
    If tn is a string then you need to enclose it within single quotes:

    strsql="select * from sbcswrtds where tn='" & tn & "'"

    I'm assuming that this is the line where the error is occurring.
    Microsoft MVP (Visual Basic)

Similar Threads

  1. find version & service packs
    By rperez in forum Database
    Replies: 5
    Last Post: 01-02-2009, 05:14 PM
  2. Replies: 0
    Last Post: 04-29-2002, 08:39 AM
  3. Replies: 1
    Last Post: 07-17-2001, 02:39 AM
  4. Access to SQL server
    By Nate in forum Database
    Replies: 29
    Last Post: 05-09-2001, 11:04 AM
  5. Replies: 0
    Last Post: 11-20-2000, 06:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center