Quick Gui to run script on database

  • Good afternoon - I am looking for a quick idea of a way to build a small GUI that a user can input the parameter, then click a submit button, which will in turn run a script on the database and pass the value to the query. I am sure there is a quick and easy way, but cannot think of one at the moment.

    This is a quick script that I am running for a user too often, and don't really want to give them server access or ssms on their machine.

    Thanks,

    Brian

  • Brian Seib (8/19/2015)


    Good afternoon - I am looking for a quick idea of a way to build a small GUI that a user can input the parameter, then click a submit button, which will in turn run a script on the database and pass the value to the query. I am sure there is a quick and easy way, but cannot think of one at the moment.

    This is a quick script that I am running for a user too often, and don't really want to give them server access or ssms on their machine.

    Thanks,

    Brian

    Pick a programming language and write it. Just make sure you parameterize your query.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • i would lean towards a web page that accepts the user input, and performs the work behind the scenes.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • SSRS would work.

  • My preference would be VS, or ssrs, just not sure how to approach it.

  • Below is a link to a 15 line sample Powershell script that prompts for input parameters, and then connects to SQL Server and executes stored procedure using those parameters.

    It also shows how to export resultset to .csv file, but that part can be removed, if the procedure call is not for reporting purposes.

    Execute Sql Stored Procedure From Powershell With Parameters

    http://www.dbascript.com/execute-sql-stored-procedure-from-powershell-with-parameters

    "Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply