Skip to content

Commit 5b2967c

Browse files
(minor) fix the "data modification" documentation page wherever constructor without argument was called (this doesn't seem to compile anymore), passing connectionString instead.
1 parent 29e80c9 commit 5b2967c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/content/data modification.fsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ do
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)
7272
let newJobTitle = "Uber " + jobTitle
7373

7474
let 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)
8888
let 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)
@@ -217,7 +217,7 @@ do
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
@@ -354,7 +354,7 @@ do
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

Comments
 (0)