Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2005, 04:27 PM
Authorized User
 
Join Date: Jan 2005
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default help keep getting this error

trying to modify this page but I kee getting this error

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ')'.

/absadmin/newcarprospects.asp, line 104

here is the code...can't seem to figure out where the error is...







<%


'---------getting customers that has not been assigned to a dealership------
sql = "SELECT mastercustomers.*,creditunions.divisionID FROM mastercustomers INNER JOIN creditunions "
sql = sql & "ON mastercustomers.cuID=creditunions.cuID where mastercustomers.mastercusID not in(select customers.mastercusID from customers)"
'response.write sql
set newcus = conn.execute(sql)


%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../xxxx.css" rel="stylesheet" type="text/css">
</head>
<Body><center>




<table width="800" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
        <tr bgcolor="#CCCCCC" class="CategoryTxt">
          <td width="7%" height="19"> </td>
          <td width="15%" height="19" class="AdminTitle">Name</td>
          <td width="14%" height="19" class="AdminTitle">Date-Time Rec</td>
          <td width="10%" height="19" class="AdminTitle">Make </td>
          <td width="10%" height="19" class="AdminTitle">Model</td>
          <td width="23%" height="19" class="AdminTitle">ZipCode</td>
          <td width="*" height="19" class="AdminTitle">Assign to Dealership</td>
        </tr>
        <%
x = 0
while not newcus.eof
fullname = newcus("lname") & ", " & newcus("fname")
car = newcus("yy") & " " & newcus("make")
fulladdress = newcus("zipcode")
mastercusID = newcus("mastercusID")

if x = 0 then
    bg = "#FFFFFF"
    x = 1
else
    bg = "#CCCCCC"
    x = 0
end if
%>
        <tr bgcolor="<%=bg%>">
          <td width="7%" class="blacktext10" height="19" align="center">
            <a href="javascript:HelpWindow=window.open('prospect. asp?mastercusID=<%=mastercusID%>',
            'HelpWindow','copyhistory=yes,toolbar=no,directori es=0,menubar=0,scrollbars=1,resizeable=1,width=650 ,height=400') ;if
            (window.name != HelpWindow) { HelpWindow.focus(); }"><img src="../images/view.gif" width="45" height="12" border="0"></a>
          </td>
          <td width="15%" class="blacktext10" height="19"><%=fullname%></td>
          <td height="19" class="blacktext10" width="14%"><%=newcus("datetimesubmitted")%>
          </td>
          <td height="19" class="blacktext10" width="10%"><%=car%></td>
          <td height="19" class="blacktext10" width="10%"><%=newcus("model")%> </td>
          <td height="19" class="blacktext10" width="23%"><%=fulladdress%></td>
          <td width="*">
            <%
sql = "select makerID from makers where maker='"&newcus("make")&"'"
set ma = conn.execute(sql)
response.write" debug sql is " & sql & "
"
if ma.eof then
    MMmakerID = 0
else
    MMmakerID = ma("makerID")
end if

sql = "select dealerships.*,makers.maker from dealerships INNER JOIN makers ON "
sql = sql & "dealerships.makerID=makers.makerID where (dactive=1 and newused='New' and dealerships.makerID="&MMmakerID&" and divisionID="&newcus("makeID")&") order by dealername"
response.write "debug sql is " & sql & "
"
set dealers = conn.execute(sql)



        %>
            <select name="deaID" onChange="window.open('prospectassign.asp?mastercu sID=<%=newcus("mastercusID")%>&deaID='+this.option s[this.selectedIndex].value,'_top')" class="blacktext10">
              <option></option>
              <%

              while not dealers.eof
              %>
              <option value="<%=dealers("deaID")%>"><%=dealers("dealerna me")%> (<%=dealers("maker")%> - <%=dealers("newused")%>)</option>
              <%
              dealers.movenext
              wend
              %>
            </select>


         </td>
        </tr>
        <%
newcus.movenext
wend
%>
</table>
 
Old January 22nd, 2005, 09:13 PM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Before executing first print the sql statement and check for any syntax error there. i.e., copy the displayed sql statement and run it seperately in query analyser.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.