April 2002
Beginner
672 pages
14h 43m
English
Now that you've seen how to call stored procedures using the OleDb namespace, it's interesting to compare the same tasks using the SqlClient namespace. Remember that when you use the SqlClient namespace, you're using code that's written to interact specifically with SQL Server, and this code can take advantage of specific SQL Server features. The code you'll see, EmpAddSqlClient, works almost identically to the EmpAddOleDb procedure you saw earlier, but there are some subtle differences.
Listing 15.6 shows the entire procedure.
Private Sub EmpAddSqlClient() Dim cmd As SqlClient.SqlCommand Dim strSQL As String Dim strConn As String ... |
Read now
Unlock full access