MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

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 Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 20th, 2004, 01:05 PM
#bb #bb is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 6 #bb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy search word in database

i want to search a word in a column of a table in my database (type: ntext). i use following stored procedure:

CREATE procedure zoekenOpWoord
(@woord AS varchar(50)) AS
SELECT *
FROM documents2
WHERE tekst LIKE '%' + @woord + '%'
GO

in my asp-page:

set rs = Server.CreateObject("ADODB.Recordset")
rs.open "zoekenOpWoord(" & mWoord1 & ")", conn, adForwardOnly, adLockReadOnly, adCmdStoredProc

but i always get this error:

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

Error Type:
Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression.

Can anyone tell me what i do wrong?

Reply With Quote
  #2  
Old June 21st, 2004, 12:52 AM
brightlight brightlight is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 371 brightlight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 32 m 27 sec
Reputation Power: 5
Try giving single quotes for the parameter

rs.open "zoekenOpWoord('" & mWoord1 & "')", conn, adForwardOnly, adLockReadOnly, adCmdStoredProc
__________________
Regards,
Brightlight

Reply With Quote
  #3  
Old June 21st, 2004, 12:25 PM
#bb #bb is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 6 #bb User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
it works! thank you sooooo much!!!!

barbara

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > search word in database


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 3 hosted by Hostway