Presentation is loading. Please wait.

Presentation is loading. Please wait.

Financial Information Management Modifying data in a DB Stefano Grazioli.

Similar presentations


Presentation on theme: "Financial Information Management Modifying data in a DB Stefano Grazioli."— Presentation transcript:

1 Financial Information Management Modifying data in a DB Stefano Grazioli

2 Critical Thinking  More thinking on your own and yet still strong  Clear all errors before submitting  Easy meter

3 Connecting to the DB from home 1.Connect to the VPN 2.From the command window type: runas /netonly /user:”mcintire\[your McIntire id]” "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe“ note that your path to visual studio might be different 3.Enter your pswd when prompted

4 ADO architecture for retrieving data Remote DataBase (financial data) Remote DataBase (financial data) Client (your machine) SQL Query string Connection string SqlConnection SqlAdapter ListObject DataSet DataTable s DataRow s DB Server SqlCommand On your Spreadsheet

5 ADO architecture for modifying data Remote DataBase (financial data) Remote DataBase (financial data) Client (your machine) SQL Query string Connection string SqlConnection DB Server SqlCommand Execution Feedback

6 ‘Canned’ vs ‘Dynamic’ Queries ‘ insert into Customer2 (C_id, F_name, L_name, City, State) – ‘ values ('C0992','Max', 'Plank', 'Roanoke', 'VA') newCId = Range("K2").Value newFName = Range("K3").Value newLName = Range("K4").Value newCity = Range("K5").Value newState = Range("K6").Value sqlString As String = String.Format( "insert into Customer2 (C_id, F_name, L_name, City, State) values ('{0}','{1}','{2}','{3}','{4}')", newCId, newFName, newLName, newCity, newState)

7 Financial Information Management Demo

8 Financial Information Management WINIT What Is New In Technology?

9 Financial Information Management Homework

10 Suggestions  Make sure that you understand the ADO architecture diagrams before coding.

11 You do the talking  Name, Major  Learning objectives  Things you like about the class  Things that can be improved  Strengths / Attitude towards the Tournament

12 Financial Information Management Best Practices Try/Catch

13 Example try-catch Try myConnection.Open() ‘… there might be more statements Catch MessageBox.Show("Ouch! I have just crashed. “, MessageBoxButtons.OK, MessageBoxIcon.Exclamation) End Try This will be tried This will run only if something goes wrong while trying

14 A Mixed Blessing  While developing an algorithm, crashes are often very informative  Bad idea to use try/catches as part of an algorithm  Put the try/catches in as a last step, after testing

15


Download ppt "Financial Information Management Modifying data in a DB Stefano Grazioli."

Similar presentations


Ads by Google