Results 1 to 13 of 13
  1. #1
    Join Date
    Oct 2003
    Posts
    10

    Unanswered: MS SQL This feature has not been implemented yet

    Hi, I'm a Delphi programmer, and using an ADO Dataset, I'm trying to select some data from a database. However, when I set it up using parameters, I get an error in Delphi that this Feature has not been implemented yet. Can anyone help me configure the MS SQL database, so I can run SQL queries with parameters?

  2. #2
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    which version of Delphi and SQL are you using. I use D6 with SQL 2k and have no problems (well, almost none) using an ADO dataset. What is your sql statement and how did you define your parameters?
    Johan

  3. #3
    Join Date
    Oct 2003
    Posts
    10
    I am using Delphi version 7 and MS SQL 2000. Here is the Commandtext from my ADODataset:

    select count(*) from CallDetail calldetail where i3timestampgmt between :BegTime and :EndTime and initiateddate between :BegTime2 and :EndTime2 and LocalUserId = :User

    If I plug in actual values in the SQL instead of parameters, the script runs just fine. Then here is how I defined the parameters:

    dmReports.ADODataSet1.Parameters.ParamByName('BegT ime').Value := FormatDateTime('mm/dd/yyyy hh:nn', BegDate);
    dmReports.ADODataSet1.Parameters.ParamByName('EndT ime').Value := FormatDateTime('mm/dd/yyyy hh:nn', EndDate + 1);
    dmReports.ADODataSet1.Parameters.ParamByName('BegT ime2').Value := FormatDateTime('mm/dd/yyyy hh:nn', BegDate);
    dmReports.ADODataSet1.Parameters.ParamByName('EndT ime2').Value := FormatDateTime('mm/dd/yyyy hh:nn', EndDate + 1);
    dmReports.ADODataSet1.Parameters.ParamByName('User ').Value := workgroupmembers[i];
    dmReports.ADODataSet1.Active := True;
    ShowMessage(dmReports.ADODataSet1COLUMN1.AsString) ;

    At the beginning of the procedure I defined them like this:

    BegTime, EndTime, BegTime2, EndTime2, User: Variant;

  4. #4
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    your declarations seem ok at first sight. My guess would be to change the parameter named 'user' to another name because this is keyword used by sql server.
    Johan

  5. #5
    Join Date
    Oct 2003
    Posts
    10
    I tried changing User to Operator, and it is still giving the exact same error. I am guessing that the MS SQL is not configured correctly, and maybe under the current configuration it can't handle parameters.

  6. #6
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227
    I don't see how it could be configured to not accept parametrized queries from a client application. What is the exact error message you get? If you click on the parameters property in the object inspector, does it display all your parameters correctly?
    Johan

  7. #7
    Join Date
    Oct 2003
    Posts
    10
    In the object inspector all the parameters are displayed correctly. Here is the message that I receive

    ---------------------------
    Debugger Exception Notification
    ---------------------------
    Project report.exe raised exception class EOleException with message '[Microsoft][ODBC SQL Server Driver]Optional feature not implemented'. Process stopped. Use Step or Run to continue.
    ---------------------------
    OK Help
    ---------------------------

  8. #8
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    There is nothing to configure in sql server to allow it to accept queries.
    Depends on what is being sent to the server by the app as to whether it will work.
    Try using the sql server profiler to trace what is being sent.

    Check the delphi documentation and the provider you are using as the error is comming probably comming from one of these

  9. #9
    Join Date
    Dec 2002
    Location
    Antwerp, Belgium
    Posts
    227

  10. #10
    Join Date
    Oct 2003
    Posts
    10
    I just ran the SQL Server Profiler from the Server, and that query is not even showing up there. I know that it connects however, because when I run a query without the parameters, it does show up.

    Also, I beleive that the Microsoft website is talking about Visual Basic, instead of Delphi.
    Last edited by aimtech; 10-12-03 at 15:28.

  11. #11
    Join Date
    Oct 2003
    Posts
    10
    Thanks for all your help jora and nigellrivett. I couldn't get it working, so I decided that instead of using parameters, I'd set the commandtext property directly with the right values in a procedure in Delphi.

  12. #12
    Join Date
    May 2011
    Posts
    1

    [Microsoft][ODBC SQL Server Driver]Optional feature not implemented

    Hi all,

    I also hit the same error, but different scenario..

    My client user hit the error '[Microsoft][ODBC SQL Server Driver]Optional feature not implemented' when performing process (Delphi program) to generate offdays records. The error occur when she perfoming it at her PC, but no problem when perform at another PC.

    What would be the cause of the problem? Anybody can help?

  13. #13
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm pretty sure that this problem lies somewhere within the MDAC. Be sure that the client machine has the SQL Server Native Client drivers installed.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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