Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Unanswered: SQL Data Manager vs Query Analyzer

    What can I do in SQL Data Manager? I thought it was something like the Query Analyzer (MSSQL), but I can't do anything in the SQL Data Manager.

    If I write this in Query Analyzer it works great:


    declare @name varchar(50)
    set @name = 'risktolerance'
    select * from profiledata where profilename = @name


    If I write something similar in SQL Data Manager I get errors on the first row:


    declare :name varchar(50);
    set :name = 'James';
    select * from person where first_name = :name;


    Is it impossible to write anything but simple select statements? How do I test my scripts without having to write a complete stored procedure?

    Yes, I am a fresh newbie, who is trying hard to like Pervasive.
    Please let me know how to work with pervasive, thanks.

  2. #2
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    You'll need to create a procedure.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  3. #3
    Join Date
    Jul 2003
    Posts
    18

    Re: SQL Data Manager vs Query Analyzer

    Hello,

    To answer your direct question, yes, to declare a variable you must do so within a stored procedure or a stored trigger.

    A broader answer is that SQL Data Manager provides a great deal of capability. For Pervasive.SQL V8, the documentation for SQL Data Manager was substantially enhanced. In it, you will find sections on the Query Pane and the Query Builder, as well as extensive tasks on how to use the utility.

    Refer to the chapter SQL Data Manager in the Pervasive.SQL User's Guide.

    You may access the online User's Guide in HTML format from here:
    http://www.pervasive.com/library/doc...e/sug7toc.html

    If you prefer, you may download a PDF or CHM version of the User's Guide from here:
    http://www.pervasive.com/support/tec...sqlv8_docs.asp

    For information about stored procedures, refer to the SQL Engine Reference. You may access it online here:
    http://www.pervasive.com/library/doc...sqlreftoc.html

    Regards,
    Tim Meiers
    Pervasive Technical Publications

    Originally posted by frasse7
    What can I do in SQL Data Manager? I thought it was something like the Query Analyzer (MSSQL), but I can't do anything in the SQL Data Manager.

    If I write this in Query Analyzer it works great:


    declare @name varchar(50)
    set @name = 'risktolerance'
    select * from profiledata where profilename = @name


    If I write something similar in SQL Data Manager I get errors on the first row:


    declare :name varchar(50);
    set :name = 'James';
    select * from person where first_name = :name;


    Is it impossible to write anything but simple select statements? How do I test my scripts without having to write a complete stored procedure?

    Yes, I am a fresh newbie, who is trying hard to like Pervasive.
    Please let me know how to work with pervasive, thanks.

  4. #4
    Join Date
    Feb 2004
    Posts
    78

    Re: SQL Data Manager vs Query Analyzer

    Originally posted by frasse7
    Is it impossible to write anything but simple select statements? How do I test my scripts without having to write a complete stored procedure?
    I understand your frustrations when comparing QA to SQL DM.

    I really only have experience with 2000i, although I am beginning to experiment with V85.

    What I've found helpful is to have your DROP, CREATE, and "CALL storedproc()" test calls all in the same SQL script (separated by #'s or whatever you use) for debugging.

    It's not quite as intuitive as QA but it gets the job done.

    Hmm, perhaps I should create a better SQL DM for Pervasive that creates a temporary Stored Proc behind the scenes for you and runs it if it detects variables, and one that doesn't freeze the entire window when running a query (i.e. the bottom pane's results are populated by a separate thread like QA), one that runs when you press 'F5'...If only I had the time. Maybe all of this has improved in V85.
    Last edited by Dilyias; 02-13-04 at 03:58.

  5. #5
    Join Date
    Feb 2004
    Posts
    2
    OK, just have to live with it then. Drop, create and call.

    When you write the new SQL DM could you include scrolling with the mouse? And the F5 key is a must.

    thanks

  6. #6
    Join Date
    Dec 2001
    Posts
    1,109
    Provided Answers: 4
    F5 is used to refresh in SQL DM. You can run the queries using short cuts though. For example, Ctrl+Shift+R runs the query to Grid. Check the menu Tools then Query for the other options.

    Also, why use F5? Delphi and C++ Builder use F9 to run.
    Mirtheil Software
    Certified Pervasive Developer
    Certified Pervasive Technician
    Custom Btrieve/VB development
    http://www.mirtheil.com
    I do not answer questions by email. Please post on the forum.

  7. #7
    Join Date
    Feb 2004
    Posts
    78
    F5 is just a carry over from QA. F5 in qbasic, visual basic, .Net, Ctrl-F5 in VC++. Ok, so it is a MS thing.

    I think I better learn the V85 DM first as it seemed to have improved since 2000i. For example, Ctrl+Shift+T does nothing in my 2000i DM.

Posting Permissions

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