using stored procedures with database searches--help!!

Results 1 to 3 of 3

Thread: using stored procedures with database searches--help!!

  1. #1
    Join Date
    Dec 1969
    Posts
    60

    Default using stored procedures with database searches--help!!

    I&#039m trying to code a table search on SQL Server, and I can&#039t seem to get the syntax right:<BR><BR><BR>storedProc = "sp_AM_DumpClients " + WHERE CStr( rsObjB( "c_name" )) LIKE &#039%" & frmKeyword & "%&#039 + CStr( rsObjB( "CS_ID" ))<BR><BR>is what I have, and it gives me the error: "Microsoft VBScript compilation error &#039 800a0401&#039 Expected end of statement"<BR><BR><BR>Help!

  2. #2
    Join Date
    Dec 1969
    Posts
    60

    Default Come on, someone has to know the answer to this syntax prob....

    ...please?

  3. #3
    Join Date
    Dec 1969
    Posts
    1,156

    Default RE: using stored procedures with database searches--help!!

    For what it&#039s worth, I didn&#039t know that you could add a WHERE clause to a stored procedure - all I&#039ve ever seen was on the order:<BR><BR>sp_Proc Param1 Param2.....<BR><BR>Even so, I think your quotes are screwed - maybe:<BR>storedProc = "sp_AM_DumpClients " + "WHERE "+ CStr( rsObjB( "c_name" ))+" LIKE &#039%" & frmKeyword & "%&#039" + CStr( rsObjB( "CS_ID" ))

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •