+ Reply to Thread
Results 1 to 1 of 1

Loop through excel records and input data in SQL database and vice versa using stored proc

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    melbourne
    MS-Off Ver
    Excel 2010
    Posts
    12

    Question Loop through excel records and input data in SQL database and vice versa using stored proc

    Hi There,

    I have an application for which the front end is Excel and the backend is SQL Server database. I have a requirement
    • to get data from a set of rows in Excel and enter it into SQL database
    • to get rows from SQL server database and copy data into Excel interface

    I have stored procedures to get and insert/update data in the database.

    Frontend Excel interface
    Tasks
    Description Inserted By Date Inserted Date Closed Responsible Person Priority Next Action


    Table in SQL Server Database
    ProjectID
    TaskID
    Description
    InsertedBy
    DateInserted
    ResponsiblePerson
    Priority
    NextAction

    Stored Procedures
    GetTasks (get all task records for a project)
    InsertUpdateTasks (at the moment this has been designed to insert one row, with input parameters for only one row)

    Require Logic to
    • To get data from database and copy it on excel interface

      Execute GetTasks
      Loop through excel to copy data in each row
    • To insert data from excel interface into the database

      Run a loop in excel to execute InsertUpdateTasks
      Storedprocedure for each row


    Can anyone please guide me how to have the for loops to insert data into database and get data from database?

    Thanks for taking time to help me.
    Attached Images Attached Images
    Last edited by behumble; 10-09-2013 at 07:10 AM. Reason: Insert detailed description

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 04-01-2013, 12:50 PM
  2. Chg input parameters on SQL Stored Proc Source on PowerPivot
    By JExpWbNewbie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2013, 02:45 PM
  3. Running SQL Stored Proc through Excel VBA
    By JezLisle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2009, 07:47 AM
  4. [SOLVED] execute stored proc in Excel
    By William in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2006, 06:55 PM
  5. how to format numbers stored as text or vice versa to use vlookup
    By teneagle in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2005, 07:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1