Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 1st, 2006, 11:28 AM
Registered User
 
Join Date: Jun 2006
Location: , NY, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default website error

I have read several posts re this issue and still cannot figure out my problem. (Code works fine for almost all Agents except one.) Any help would be appreciated.


Receiving the following error (code below):

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'L'.
/acs.asp, line 175


SQL CODE:
function RetrieveBranch(dcnDB)
    dim strSQL
    dim rsBranch
    if request.form("RegionList") = "USA" then
        strSQL = "select distinct IATA, Agent, City, State, Zip from Agent where Agent in ('" & request.form("AgentList") & "') order by IATA "
    else
        strSQL = "select distinct IATA, Agent, City, State, Zip from Agent where Agent in ('" & request.form("AgentList") & "') and Region in ('" & request.form("RegionList") &"') order by IATA "
    end if
    set rsBranch = dcnDB.Execute(strSQL) (THIS IS LINE 175)
    set RetrieveBranch = rsBranch
end function

Thanks.

  #2 (permalink)  
Old June 1st, 2006, 12:25 PM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Can you post the SQL statement that creates the error?

Before line 175 write:

Response.Write strSQL
Response.End

Then run this code selecting the Agent that produces the error. Then post that SQL statement here.

  #3 (permalink)  
Old June 1st, 2006, 01:01 PM
Registered User
 
Join Date: Jun 2006
Location: , NY, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After inserting
Response.Write strSQL
Response.End

Output below:

select distinct IATA, Agent, City, State, Zip from Agent where Agent in ('EXPEDITORS INT'L. OF WASHINGTON INC.') order by IATA


I have checked over the records for this Agent and all looks normal.

  #4 (permalink)  
Old June 1st, 2006, 01:08 PM
Registered User
 
Join Date: Jun 2006
Location: , NY, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Problem solved.

It was the "'" in the name (int'l)that was causing the error.

Thanks :D

EXPEDITORS INT'L. OF WASHINGTON INC

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error when debging website WroxUnited pdf kingchemical ASP.NET 2.0 Basics 1 February 20th, 2008 01:28 PM
all about website benny HTML Code Clinic 2 February 11th, 2008 04:49 AM
Dynamic website to Static website Aboal3ood ASP.NET 1.x and 2.0 Application Design 4 December 7th, 2006 11:46 AM
Unknown Error "-1" when opening new website MzMoody BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 November 10th, 2006 01:08 PM
The Code of book ASP.NET Website Programming Error jackahu BOOK: ASP.NET Website Programming Problem-Design-Solution 0 June 16th, 2004 11:04 AM



All times are GMT -4. The time now is 05:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.