Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 19th, 2005, 06:13 PM
checho checho is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 2 checho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 27 m 59 sec
Reputation Power: 0
Syntax error keyword 'where'

Hi guys,
I am using SQL 2000 server on a windows 2000 server. I have store procedure that was working and now it is giving me an error. The error I get is the following:

[Microsoft][OBDC SQL Server driver][SQL server]incorrect syntax near the keyword 'where'

Does anybody know how to fix this?

Thanks a lot.

Reply With Quote
  #2  
Old February 19th, 2005, 07:03 PM
lewy's Avatar
lewy lewy is offline
Alter Ego Wizard
Click here for more information.
 
Join Date: Jun 2004
Location: Edinburg Tx
Posts: 4,384 lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 1009 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Week 1 Day 23 h 40 m 30 sec
Reputation Power: 1488
Post the code for your stored procedure, there may be something misspelled, a comma out of place or something like that.

Reply With Quote
  #3  
Old February 19th, 2005, 07:16 PM
checho checho is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 2 checho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 27 m 59 sec
Reputation Power: 0
Sorry

Sorry i forgot the coding. One more clue. I get error when i try to see the BINDINGS in Dreamweaver 2004. I don't get the error in the SQL server.


CREATE PROCEDURE [dbo].[CityStateResultBasic]
@varCity varchar (50),
@varState char (2)
AS
begin
if (@varCity != 'a' and @varState != 'b')
begin
SELECT City, State, ZipCode, TypeofHouse, Sqft, NumberofBeds, Price, NumberofBaths,PropertyID



FROM dbo.tbl_total_prop_info
WHERE City = @varCity and State = @varState
end
else if (@varCity = 'a' and @varState !='b')
begin
SELECT City, State, ZipCode, TypeofHouse, Sqft, NumberofBeds,Price,NumberofBaths, PropertyID
FROM dbo.tbl_total_prop_info
WHERE State = @varState
end
end
GO

Reply With Quote
  #4  
Old February 20th, 2005, 06:09 AM
A2k's Avatar
A2k A2k is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 166 A2k User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 44 m 10 sec
Reputation Power: 4
Syntax seems ok, I've never used Dreamweaver, but it could be something wrong there. perhaps you might post some of your Server Side code (JSP, ASP ect...).

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Syntax error keyword 'where'


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT