may be .NET problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Paul (Paul_at_discussions.microsoft.com)
Date: 09/14/04


Date: Tue, 14 Sep 2004 10:01:08 -0700

Hi I have a stored procedure that uses the sp_executesql to dynamically build
a query. Anyhow the procedure runs fine from within the server explorer and
query analyzer (after adding declare statements) but when I try to use the
SQL data adapter wizard I get an error (syntax error by keyword 'BY') also a
data set is not created.
I am using a print @SQL and this is the only portion that has the 'BY'keyword
in the ORDER BY section.

AND (dbo.DML$Data_Item_Log_T.POC_ID = @poc_id) AND
(dbo.DML$Data_Item_Log_T.Data_Type_CH = @dt_type) AND
(dbo.DML$Data_Item_Event_Log_T.Event_Entry_Date_DT <= CONVERT(DATETIME,
@logdt_end, 102))
 ORDER BY DML$Data_Item_Log_T.Data_Item_Log_ID DESC

Just wondering if anyone has any ideas?
Thanks.

-- 
Paul G
Software engineer.


Relevant Pages

  • stored procedure query
    ... I have a stored procedure that I use in a pass-through query and have many ... complex but populates in one second when run from SQL query analyzer. ... It's not a typo or syntax error. ...
    (microsoft.public.access.queries)
  • Executing Stored Procedure from Access
    ... When I try to execute a stored procedure from Access Pass ... Through Query I get ODBC- Call Failed, ... Syntax error or access violation.. ...
    (microsoft.public.access.modulesdaovba)
  • Re: noise words, @@ERROR, and stop and resume indexing
    ... > Noiseword varcharNot Null ... > the data from the noise file to the noise_words table. ... >> A clause of the query contained only ignored words. ... >> into query analyzer before starting the stored procedure. ...
    (microsoft.public.sqlserver.fulltext)
  • RE: ODBC query in VB code Need HELP
    ... I am trying to get a stored procedure to run on info I send it I do not need ... I played around and got the code below to work using a pass-through query, ... Dim strpass As String ...
    (microsoft.public.access.formscoding)
  • Re: slowing/halting stored procedure from ado.net
    ... calling the same stored procedure from SQL> Management ... > Studio goes without any slowdown, ... > There was/is no big job running on the sql server, ... >> Erratic performance of any query is usually due to something changing. ...
    (microsoft.public.dotnet.framework.adonet)