2929 INSERT INTO Sales.CurrencyRate
3030 VALUES (@currencyRateDate, @fromCurrencyCode, @toCurrencyCode,
3131 @averageRate, @endOfDayRate, DEFAULT)
32- " , connectionString>()
32+ " , connectionString>( connectionString )
3333
3434 let recordsInserted =
3535 cmd.Execute(
@@ -63,7 +63,7 @@ let businessEntityID, jobTitle, hireDate =
6363 HumanResources.Employee
6464 WHERE
6565 BusinessEntityID = @id
66- " , connectionString, ResultType.Tuples, SingleRow = true >()
66+ " , connectionString, ResultType.Tuples, SingleRow = true >( connectionString ) )
6767
6868 jamesKramerId |> cmd.Execute |> Option.get
6969
@@ -72,7 +72,7 @@ assert("Production Technician - WC60" = jobTitle)
7272let newJobTitle = " Uber " + jobTitle
7373
7474let recordsAffrected =
75- use updatedJobTitle = new AdventureWorks.HumanResources.uspUpdateEmployeeHireInfo()
75+ use updatedJobTitle = new AdventureWorks.HumanResources.uspUpdateEmployeeHireInfo( connectionString ) )
7676 updatedJobTitle.Execute(
7777 businessEntityID,
7878 newJobTitle,
@@ -88,7 +88,7 @@ assert(recordsAffrected = 1)
8888let updatedJobTitle =
8989 // Static Create factory method provides better IntelliSense than ctor.
9090 // See https://github.com/Microsoft/visualfsharp/issues/449
91- use cmd = new AdventureWorks.dbo.ufnGetContactInformation()
91+ use cmd = new AdventureWorks.dbo.ufnGetContactInformation( connectionString )
9292
9393 //Use ExecuteSingle if you're sure it return 0 or 1 rows.
9494 let result = cmd.ExecuteSingle( PersonID = jamesKramerId)
217217 WHERE FromCurrencyCode = @from
218218 AND ToCurrencyCode = @to
219219 AND CurrencyRateDate > @date
220- " , connectionString, ResultType.DataReader>()
220+ " , connectionString, ResultType.DataReader>( connectionString )
221221 //ResultType.DataReader !!!
222222 let currencyRates = new AdventureWorks.Sales.Tables.CurrencyRate()
223223 //load data into data table
354354 WHERE FromCurrencyCode = @from
355355 AND ToCurrencyCode = @to
356356 AND CurrencyRateDate > @date
357- " , connectionString, ResultType.DataTable>()
357+ " , connectionString, ResultType.DataTable>( connectionString )
358358 //ResultType.DataTable !!!
359359 let currencyRates = cmd.Execute( " USD" , " GBP" , DateTime( 2014 , 1 , 1 ))
360360
0 commit comments