SQL Problem

Results 1 to 2 of 2

Thread: SQL Problem

  1. #1
    Join Date
    Dec 1969

    Default SQL Problem

    My recordset works perfectly until the string that the recordset is based on contains an apostrophe. Then it gives me a syntax missing operator error. Is there a way that the string that the recordset is based can contain an apostrophe without this error. Here is the SQL statement I use now:<BR><BR>strSQL = "SELECT * FROM Team WHERE Team_Name = &#039;" & strTeamName & "&#039; AND Div_ID = &#039;" & strDiv_ID & "&#039;"<BR>Set objrsTeam = Server.CreateObject("ADODB.Recordset")<BR>objrsTea m.Open strSQL, objConn, 2, 3, 1<BR><BR>This works perfectly as I said until strTeamName contains "HITMEN&#039;S THUNDER" for example. Any idea how I can get around the apostrophe thing?

  2. #2
    Heaven's Martini Guest

    Default RE: SQL Problem


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts