May 2004
Intermediate to advanced
888 pages
22h 31m
English
The steps to executing a stored procedure is just as straightforward as executing other non-query commands. Listing 19.5 illustrates these steps.
1: program sp_addco; 2: 3: {$APPTYPE CONSOLE} 4: 5: {%DotNetAssemblyCompiler 'C:\windows\microsoft.net\framework\v1.1.4322\System.Data.dll'} 6: 7: uses 8: SysUtils, 9: System.Data, 10: System.Data.SqlClient; 11: 12: const 13: c_cnstr = 'server=XWING;database=ddn_company;Trusted_Connection=Yes'; 14: c_ddn_add_company = 'ddn_add_company'; 15: var 16: sqlcon: SqlConnection; 17: cmd: SqlCommand; 18: param: SqlParameter; 19: begin 20: sqlcon := SqlConnection.Create(c_cnstr); 21: cmd := SqlCommand.Create(c_ddn_add_company, sqlcon); 22: cmd.CommandType ... |
Read now
Unlock full access