Financial Information Management Modifying data in a DB Stefano Grazioli
Critical Thinking More thinking on your own and yet still strong Clear all errors before submitting Easy meter
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
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
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
‘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)
Financial Information Management Demo
Financial Information Management WINIT What Is New In Technology?
Financial Information Management Homework
Suggestions Make sure that you understand the ADO architecture diagrams before coding.
You do the talking Name, Major Learning objectives Things you like about the class Things that can be improved Strengths / Attitude towards the Tournament
Financial Information Management Best Practices Try/Catch
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
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