Skip to content

Commit 1d937f3

Browse files
Fix Oracle parameter syntax from '@' to ':' in database-providers.md
Oracle.ManagedDataAccess.Client requires colon-prefixed parameters (e.g., :paramName) instead of at-signs (@paramName). The original example used @authorname, which results in a runtime error. https://docs.oracle.com/en/error-help/db/ora-00936
1 parent 241b350 commit 1d937f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

learndapper.com/pages/database-providers.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCO
5858
using (var connection = new OracleConnection(connectionString))
5959
{
6060
// Create a query that retrieves all books with an author name of "John Smith"
61-
var sql = "SELECT * FROM Books WHERE Author=@authorName";
61+
var sql = "SELECT * FROM Books WHERE Author=:authorName";
6262

6363
// Use the Query method to execute the query and return a list of objects
6464
var books = connection.Query<Book>(sql, new {authorName="John Smith"}).ToList();
@@ -142,4 +142,4 @@ Like other providers, you must first create a connection and use any available D
142142
## Related Articles
143143

144144
- [Bulk Operations](/bulk-operations)
145-
- [Querying Methods](/dapper-query)
145+
- [Querying Methods](/dapper-query)

0 commit comments

Comments
 (0)