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.
Bookmarks