 |
| ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Basics 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
|
|
|
|

May 16th, 2007, 03:47 AM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Syntax error on some IIS
Does anyone has any idea what could be wrong
I have an ASP page, which runs OK on some IIS but on other IIS(for ex. my comp) IE throws an error "Syntax error" in SQL statement.
I would understand that it would not work on any IIS but strange thing is that it works on some and on some it gives me this error.
Any ideas what should I do??
Or can soemone explain me how can I debug this page(default.asp) with some debugger. I tried to debug it but the problem is I cant use any of this damn debuggers:(( (nothing is geting debugged default.asp is just opened in debuger and I can see the source but that is it nothing more)
Thnx for replies
|
|

May 16th, 2007, 07:23 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Does the error give you a line number? And if so, can you post the relevant code?
- Peter
|
|

May 16th, 2007, 09:01 AM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
line 41 gives an error error in date expression
Code:
Set rsObjave = Server.CreateObject("ADODB.Recordset")
rsObjave.ActiveConnection = MM_connBlog_STRING
rsObjave.Source = "SELECT dtePostDate, intCatID, intPostBy, intPostID, memPostContent, txtPostTitle, txtNickName, ST_knjig FROM tblBlog, tblUsers WHERE bitPostShow = " + Replace(rsObjave__MMColParam, "'", "''") + " And tblBLog.intPostBy = tblUsers.intUserID AND dtePostDate > #" + Replace(rsObjave__MMColParam2, "'", "''") + "# AND intCatID LIKE '" + Replace(rsObjave__MMColParam3, "'", "''") + "' AND txtPostTitle LIKE '%" + Replace(rsObjave__MMColParam4, "'", "''") + "%' ORDER BY dtePostDate DESC"
rsObjave.CursorType = 0
rsObjave.CursorLocation = 2
rsObjave.LockType = 1
I think it is somwhere here
Database is access
|
|

May 16th, 2007, 09:06 AM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
But the strange thing is it works somwhere but on my personal pc it does not
Does it maybe have something to do with regional settings of IIS or WinXP
|
|

May 16th, 2007, 09:11 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Ok. IE isn't throwing the error, the ASP Interpeter is throwing it. Secondly, this has nothing (or shouldn't) to do with your environment, it has to do with your SQL Statement. Since you have said that it works sometimes and other times it does not, I can only assume you are passing in a value to the Sql statement that causes it to bomb. Since you can't step into the code, read this articl about handling errors and just have your system send you an email with relevant data, e.g. what your sql statement looked like at the time of failure.
http://www.4guysfromrolla.com/webtech/060399-1.shtml
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
|
|

May 16th, 2007, 10:42 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Also, please post question in the appropriate forum. (This is ASP.NET, not [Classic] ASP).
- Peter
|
|

May 19th, 2007, 06:07 AM
|
|
Authorized User
|
|
Join Date: Jan 2006
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ok planoie thnx for info and for your help
Will post it in right section next time
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Parse error: syntax error, unexpected T_ELSE in /h |
vipin k varghese |
BOOK: XSLT Programmer's Reference, 2nd Edition |
4 |
September 29th, 2011 01:19 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 |
| Parse error: syntax error, unexpected T_STRING |
ginost7 |
Beginning PHP |
1 |
November 9th, 2007 02:51 AM |
| VB Error: Syntax Error or Access Violation |
codehappy |
VB How-To |
7 |
October 3rd, 2007 05:41 PM |
| CreateObject error on IIS 4 but not IIS 5 |
timtom |
Classic ASP XML |
1 |
December 5th, 2003 01:26 PM |
|
 |