{"id":2609,"date":"2018-07-12T12:04:03","date_gmt":"2018-07-12T10:04:03","guid":{"rendered":"https:\/\/www.sqlnethub.com\/?p=2609"},"modified":"2024-12-12T14:36:17","modified_gmt":"2024-12-12T12:36:17","slug":"using-the-csharp-sqlparameter-object-writing-more-secure-code","status":"publish","type":"post","link":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/","title":{"rendered":"Using the C# SqlParameter Object for Writing More Secure Code"},"content":{"rendered":"<p>C# SqlParameter is a handy feature allows you to safely pass a parameter to a <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/system.data.sqlclient.sqlcommand(v=vs.110).aspx\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">SqlCommand<\/a> object in .NET. A security best practice when writing .NET data access code, is to always use parameters in SqlCommand objects (whenever parameters are required of course). The reason for this, is that parameters help prevent <a href=\"https:\/\/www.owasp.org\/index.php\/SQL_Injection\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">SQL injection<\/a> attacks.<\/p>\n<p>As described in <a href=\"https:\/\/www.owasp.org\/index.php\/SQL_Injection\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OWASP<\/a>,\u00a0a SQL injection attack consists of insertion or &#8220;injection&#8221; of a SQL query via the input data from the client to the application.<\/p>\n<hr \/>\n<blockquote>\n<p style=\"text-align: center;\"><em><span style=\"color: #ff0000;\"><strong>We Can Help you Get Started with .NET Programming Fast and Easy!<\/strong><\/span><\/em><\/p>\n<p style=\"text-align: center;\"><em>Enroll to our online course titled <\/em>&#8220;<strong><a title=\".NET Programming for Beginners - Windows Forms with C#\" href=\"\/go\/course-dot-net-win-forms\" target=\"_blank\" rel=\"noopener\">.NET Programming for Beginners: Windows Forms (C#)<\/a><\/strong>&#8221; <em><br \/>\n<span style=\"color: #008000;\">(special limited-time discount included in link).<\/span><\/em><\/p>\n<figure id=\"attachment_9071\" aria-describedby=\"caption-attachment-9071\" style=\"width: 150px\" class=\"wp-caption aligncenter\"><a href=\"\/go\/course-dot-net-win-forms\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"wp-image-9071\" title=\".NET Programming for Beginners - Windows Forms with C#\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2020\/08\/dotnet-programming-win-forms-image_final-300x200.jpg\" alt=\".NET Programming for Beginners - Windows Forms with C# (Online Course)\" width=\"160\" height=\"107\" srcset=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2020\/08\/dotnet-programming-win-forms-image_final-300x200.jpg 300w, https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2020\/08\/dotnet-programming-win-forms-image_final-1024x682.jpg 1024w, https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2020\/08\/dotnet-programming-win-forms-image_final-768x512.jpg 768w, https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2020\/08\/dotnet-programming-win-forms-image_final.jpg 1280w\" sizes=\"(max-width: 160px) 100vw, 160px\" \/><\/a><figcaption id=\"caption-attachment-9071\" class=\"wp-caption-text\"><span style=\"color: #ff0000;\">(Lifetime Access)<\/span><\/figcaption><\/figure>\n<p style=\"text-align: center;\"><em>Learn how to implement Windows Forms projects in .NET using Visual Studio and C#, how to implement multithreading, how to create deployment packages and installers for your .NET Windows Forms apps using ClickOnce in Visual Studio, and more!\u00a0<\/em><\/p>\n<p style=\"text-align: center;\"><em>Many live demonstrations and downloadable resources included!<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"maxbutton-25 maxbutton maxbutton-enroll-from-12-99\" target=\"_blank\" title=\"Learn more about the online course!\" rel=\"noopener\" href=\"\/go\/course-dot-net-win-forms\"><span class='mb-text'>Learn More<\/span><\/a><\/p>\n<\/blockquote>\n<hr \/>\n<p>When searching the internet, you can find many examples regarding the usage of C# SqlParameter objects. However, when you try to use them the way described in some articles, it just don&#8217;t work.<\/p>\n<p>The purpose of this article, is to show by example how you can properly use the C# SqlParameter object in your .NET source code and thus have a more secure communication with SQL Server.<\/p>\n<h3>A Bad Example &#8211; High Risk Code (Code A)<\/h3>\n<p>First, let&#8217;s see a <span style=\"color: #ff0000;\"><strong><span style=\"text-decoration: underline;\">bad example<\/span><\/strong><\/span>\u00a0of a database connection via .NET with a high-risk query that does not use parameters and instead it concatenates user input with the original query:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing System.Data.SqlClient;\r\nnamespace Test_Database_Connection\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n            string connString = @\"Server=.\\SQL2K17;Database=master;Trusted_Connection = True;\";\r\n            using (SqlConnection conn = new SqlConnection(connString))\r\n            {\r\n                \/\/set the command to execute against SQL Server (this is where you set your query)\r\n                string query = @\"SELECT[fileid],[filename] FROM sysfiles WHERE name = '\" + args[0].ToString() + \"'\";\r\n\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\"Informational\");\r\n                Console.WriteLine(\"-------------\");\r\n                Console.WriteLine(\"Query to execute: \" + query);\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\"\");\r\n\r\n                \/\/set SqlCommand\r\n                SqlCommand cmd = new SqlCommand(query, conn);\r\n\r\n                \/\/open connection\r\n                conn.Open();\r\n\r\n                \/\/the actual command execution\r\n                SqlDataReader dr = cmd.ExecuteReader();\r\n\r\n                \/\/if reader has any rows retrieve them\r\n                if (dr.HasRows)\r\n                {\r\n                    Console.WriteLine(\"Query Results\");\r\n                    Console.WriteLine(\"-------------\");\r\n                    while (dr.Read())\r\n                    {\r\n                        \/\/handle the retrieved record (i.e. display it)\r\n                        Console.WriteLine(dr.GetInt16(0) + \" \u2013 \" + dr.GetString(1));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    Console.WriteLine(\"Query Results\");\r\n                    Console.WriteLine(\"-------------\");\r\n                    Console.WriteLine(\"Error: Not data found.\");\r\n                }\r\n\r\n                dr.Close();\r\n            }\r\n        }\r\n    }\r\n}<\/pre>\n<p>As you can see, in the above code, <strong>line 17-18 <\/strong>builds up the query string by concatenating to the static text, the user input (args[0]). <strong><span style=\"color: #ff0000;\">This is completely wrong and dangerous<\/span><\/strong>. This is like saying: <em>&#8220;come and inject some malicious code!&#8221; \ud83d\ude42<\/em><\/p>\n<p>Here&#8217;s the output of the above code:<\/p>\n<p><a href=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_unsecure_code-1.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-2623 size-full\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_unsecure_code-1.png\" alt=\"C# SqlParameter Example - SQLNetHub Blog\" width=\"896\" height=\"385\" srcset=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_unsecure_code-1.png 896w, https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_unsecure_code-1-300x129.png 300w, https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_unsecure_code-1-768x330.png 768w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Turning the High Risk Code (Code A) into Secure Code with the use of C# SqlParameter (Code B)<\/h3>\n<p>Now, let&#8217;s re-write the bad code and change it into more secure, thus reducing the risk of SQL injection. So, SqlParameter comes to the rescue!<\/p>\n<p>Based on the above example, the code would be changed as below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing System.Data.SqlClient;\r\nusing System.Data;\r\n\r\nnamespace Test_Database_Connection\r\n{\r\n    class Program\r\n    {\r\n        static void Main(string[] args)\r\n        {\r\n\r\n            string connString = @\"Server=.\\SQL2K17;Database=master;Trusted_Connection = True;\";\r\n            using (SqlConnection conn = new SqlConnection(connString))\r\n            {\r\n                \/\/set the command to execute against SQL Server (this is where you set your query)\r\n                string query = @\"SELECT[fileid],[filename] FROM sysfiles WHERE name = @dbName\";\r\n\r\n                \/\/set SqlCommand\r\n                SqlCommand cmd = new SqlCommand(query, conn);\r\n\r\n                \/\/Set SqlParameter\r\n                SqlParameter param = new SqlParameter();\r\n                param.ParameterName = \"@dbName\";\r\n                param.SqlDbType = SqlDbType.VarChar;\r\n                param.Value = args[0].ToString();\r\n\r\n                \/\/Add SqlParameter to SqlCommand\r\n                cmd.Parameters.Add(param);\r\n\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\"Informational\");\r\n                Console.WriteLine(\"-------------\");\r\n                Console.WriteLine(\"Query to execute: \" + cmd.CommandText);\r\n                Console.WriteLine(\"\");\r\n                Console.WriteLine(\"\");\r\n\r\n\r\n                \/\/open connection\r\n                conn.Open();\r\n\r\n                \/\/the actual command execution\r\n                SqlDataReader dr = cmd.ExecuteReader();\r\n\r\n                \/\/if reader has any rows retrieve them\r\n                if (dr.HasRows)\r\n                {\r\n                    Console.WriteLine(\"Query Results\");\r\n                    Console.WriteLine(\"-------------\");\r\n                    while (dr.Read())\r\n                    {\r\n                        \/\/handle the retrieved record (i.e. display it)\r\n                        Console.WriteLine(dr.GetInt16(0) + \" \u2013 \" + dr.GetString(1));\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    Console.WriteLine(\"Query Results\");\r\n                    Console.WriteLine(\"-------------\");\r\n                    Console.WriteLine(\"Error: Not data found.\");\r\n                }\r\n                dr.Close();\r\n            }\r\n        }\r\n    }\r\n}<\/pre>\n<p>As you can see in the above, new, more-secure code, now, we do not make use of string concatenation for constructing the final query. Instead, we are making use of the SqlParameter object in the following way:<\/p>\n<ol>\n<li>In the initial query text, we write our query and in the WHERE clause, we are making use of the parameter @dbName<\/li>\n<li>We then create the SqlParameter object, we define the parameter&#8217;s name, in this case &#8220;@dbName&#8221; and the type (i.e. VarChar)<\/li>\n<li>The next step is to define the value for the newly created parameter. In this case we set as the parameter&#8217;s value, the user&#8217;s input via the command line arguments input args[0].ToString()<\/li>\n<li>Now that the SqlParameter object is properly created and defined, we just add it to the SqlCommand object with the command &lt;SqlCommandObject&gt;<span class=\"\">.Parameters.<\/span><span class=\"me1\">Add<\/span><span class=\"br0\">(<\/span><span class=\"\">param<\/span><span class=\"br0\">)<\/span><span class=\"\">;<\/span><\/li>\n<\/ol>\n<p>Here&#8217;s the output of the new code (it is actually the same but this time the output was produced by the secure version of the code):<\/p>\n<p><a href=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_secure_code.png\"><img decoding=\"async\" class=\"alignnone wp-image-2624 size-full\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_secure_code.png\" alt=\"C# SqlParameter Example - SQLNetHub Blog\" width=\"843\" height=\"382\" srcset=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_secure_code.png 843w, https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_secure_code-300x136.png 300w, https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/C_Sharp_SqlParameter_secure_code-768x348.png 768w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/a><\/p>\n<p>That&#8217;s it! Now, you have a more secure code with the help of the SqlCommand parameter!<\/p>\n<p>&nbsp;<\/p>\n<h3>A Useful Advice<\/h3>\n<p>In software development and generally in IT, there are always two options available for all the tasks that you do:<\/p>\n<ul>\n<li>Option A: Just get things done<\/li>\n<li>Option B: Get things done right<\/li>\n<\/ul>\n<p>If you work based on Option A, it is highly likely that your code will always end up look like Code A (insecure code)<\/p>\n<p>If you work based on Option B, there is a good chance to get your code look like Code B (secure code).<\/p>\n<p>Personally, I always prefer <strong>Option B,<\/strong> no matter the fact that sometimes it takes a little bit more time \ud83d\ude42<\/p>\n<p>Learn more about how you can protect your code from SQL Injection by checking\u00a0<a href=\"https:\/\/www.owasp.org\/index.php\/SQL_Injection_Prevention_Cheat_Sheet\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OWASP&#8217;s SQL Injection Prevention Cheat Sheet<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h3>Recommended Online Courses:<\/h3>\n<ul>\n<li><a href=\"\/go\/course-sql-server-security-best-practices\/\" target=\"_blank\" rel=\"nofollow noopener\"><span style=\"text-decoration: underline;\">SQL Server Security Best Practices<\/span><\/a><\/li>\n<li><a href=\"\/go\/course-ai-demystified\/\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">AI Demystified: A 1-Hour Beginner&#8217;s Guide<\/span><\/a> (Suitable for Non-Technical People)<\/li>\n<li><a href=\"\/go\/course-introduction-ai-essentials\/\" target=\"_blank\" rel=\"noopener\"><span style=\"text-decoration: underline;\">AI Essentials: A Beginner&#8217;s Guide to Artificial Intelligence<\/span><\/a><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.sqlnethub.com\/go\/course-human-ai-synergy\/\" target=\"_blank\" rel=\"noopener\">Human-AI Synergy: Teams and Collaborative Intelligence<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/data-management-beginners\/\" target=\"_blank\" rel=\"noopener\">Data Management for Beginners &#8211; Main Principles<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-sql-server-2022\/\" target=\"_blank\" rel=\"noopener\">SQL Server 2022: What\u2019s New &#8211; New and Enhanced Features<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/go\/course-python-sql-server\/\" target=\"_blank\" rel=\"noopener\">Working with Python on Windows and SQL Server<\/a><\/span><a style=\"text-decoration: underline;\" href=\"\/go\/course-python-sql-server\/\" target=\"_blank\" rel=\"noopener\"> Databases<\/a><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/go\/introduction-azure-database-mysql\/\" target=\"_blank\" rel=\"noopener\">Introduction to Azure Database for MySQL<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-in-memory-oltp-sql-server\/\" target=\"_blank\" rel=\"noopener noreferrer\">Boost SQL Server Database Performance with In-Memory OLTP<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-introduction-azure-sql\/\" target=\"_blank\" rel=\"noopener noreferrer\">Introduction to Azure SQL Database for Beginners<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-essential-sql-admin-tips\/\" target=\"_blank\" rel=\"noopener noreferrer\">Essential SQL Server Administration Tips<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-sql-server-fundamentals\/\" target=\"_blank\" rel=\"noopener noreferrer\">SQL Server Fundamentals &#8211; SQL Database for Beginners<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/go\/course-essential-sql-dev-tips\/\" target=\"_blank\" rel=\"noopener noreferrer\">Essential SQL Server Development Tips for SQL Developers<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-philosophy-fundamentals-computer-programming\/\" target=\"_blank\" rel=\"noopener\">Introduction to Computer Programming for Beginners<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/go\/course-dot-net-win-forms\" target=\"_blank\" rel=\"noopener\">.NET Programming for Beginners &#8211; Windows Forms with C#<\/a><\/span><span style=\"text-decoration: underline;\"><br \/>\n<\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-sql-server-2019\/\" target=\"_blank\" rel=\"noopener\">SQL Server 2019: What\u2019s New &#8211; New and Enhanced Features<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-entity-framework-beginner\/\" target=\"_blank\" rel=\"noopener\">Entity Framework: Getting Started &#8211; Complete Beginners Guide<\/a><\/span><span style=\"text-decoration: underline;\"><br \/>\n<\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a style=\"text-decoration: underline;\" href=\"https:\/\/www.sqlnethub.com\/go\/course-start-monetize-successful-blog\/\" target=\"_blank\" rel=\"noopener noreferrer\">A Guide on How to Start and Monetize a Successful Blog<\/a><\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Read Also:<\/h3>\n<ul>\n<li><a href=\"\/blog\/how-to-set-filters-for-openfiledialog-and-savefiledialog-in-c-sharp\/\" rel=\"\"><span style=\"text-decoration: underline;\">How to Set Filters for OpenFileDialog and SaveFileDialog in C#<\/span><\/a><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/blog\/dotnet-programming-for-beginners-windows-forms-c-sharp\/\" rel=\"\">.NET Programming for Beginners \u2013 Windows Forms (C#)<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/blog\/what-is-abstraction-in-object-oriented-programming\/\">What is Abstraction in Object Oriented Programming?<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/blog\/using-clickonce-for-deploying-your-dotnet-windows-forms-apps\/\">Using ClickOnce for Deploying your .NET Windows Forms Apps<\/a><\/span><\/li>\n<li><a href=\"https:\/\/www.sqlnethub.com\/blog\/there-is-no-argument-given-that-corresponds-to-the-required-formal-parameter\/\">There is no argument given that corresponds to the required formal parameter<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlnethub.com\/blog\/how-to-establish-a-simple-connection-from-a-c-program-to-sql-server\/\">How to Establish a Simple Connection from a C# Program to SQL Server<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlnethub.com\/blog\/the-timeout-period-elapsed-prior-to-obtaining-a-connection-from-the-pool\/\" aria-label=\"\u201cThe timeout period elapsed prior to obtaining a connection from the pool\u201d (Edit)\">The timeout period elapsed prior to obtaining a connection from the pool<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlnethub.com\/blog\/closing-a-c-application-including-hidden-forms\/\">Closing a C# Application (including hidden forms)<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlnethub.com\/blog\/changing-the-startup-form-in-a-c-project\/\">Changing the startup form in a C# project<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlnethub.com\/blog\/cannot-implicitly-convert-type-string-to-system-windows-forms-datagridviewtextboxcolumn\/\">Cannot implicitly convert type \u2018string\u2019 to \u2018System.Windows.Forms.DataGridViewTextBoxColumn<\/a><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/blog\/the-type-or-namespace-name-office-does-not-exist-in-the-namespace-microsoft-how-to-resolve\/\" rel=\"\">The type or namespace name \u2018Office\u2019 does not exist in the namespace \u2018Microsoft\u2019 \u2013 How to Resolve<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.sqlnethub.com\/blog\/how-to-connect-to-sql-server-from-visual-c-plus-plus\/\">How to Connect to SQL Server from Visual C++.<\/a><\/span><\/li>\n<li><span style=\"text-decoration: underline;\"><a href=\"\/blog\/how-to-build-a-simple-image-viewer-with-net-winforms-and-c-sharp-in-visual-studio\/\">How to Build a Simple Image Viewer with .NET WinForms and C# in Visual Studio<\/a><\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<blockquote><p>Subscribe to the <span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.linkedin.com\/newsletters\/gnoelixiai-hub-newsletter-7146562421044793344\" target=\"_blank\" rel=\"noopener\">GnoelixiAI Hub newsletter<\/a><\/span> on LinkedIn and stay up to date with the latest AI news and trends.<\/p>\n<p>Subscribe to the SQLNetHub <span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.youtube.com\/sqlnethubtv?sub_confirmation=1\" target=\"_blank\" rel=\"nofollow noopener\">YouTube channel<\/a><\/span> (SQLNetHub TV).<\/p>\n<p>Subscribe to my <span style=\"text-decoration: underline;\"><a href=\"https:\/\/www.youtube.com\/@aartemioutech\" target=\"_blank\" rel=\"noopener\">personal YouTube channel<\/a><\/span>.<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Rate this article:<\/strong><\/span> <span id=\"post-ratings-2609\" class=\"post-ratings\" data-nonce=\"d7338e8edb\"><img decoding=\"async\" id=\"rating_2609_1\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"1 Star\" title=\"1 Star\" onmouseover=\"current_rating(2609, 1, '1 Star');\" onmouseout=\"ratings_off(4.4, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_2609_2\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"2 Stars\" title=\"2 Stars\" onmouseover=\"current_rating(2609, 2, '2 Stars');\" onmouseout=\"ratings_off(4.4, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_2609_3\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"3 Stars\" title=\"3 Stars\" onmouseover=\"current_rating(2609, 3, '3 Stars');\" onmouseout=\"ratings_off(4.4, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_2609_4\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_on.gif\" alt=\"4 Stars\" title=\"4 Stars\" onmouseover=\"current_rating(2609, 4, '4 Stars');\" onmouseout=\"ratings_off(4.4, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/><img decoding=\"async\" id=\"rating_2609_5\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/plugins\/wp-postratings\/images\/stars\/rating_half.gif\" alt=\"5 Stars\" title=\"5 Stars\" onmouseover=\"current_rating(2609, 5, '5 Stars');\" onmouseout=\"ratings_off(4.4, 5, 0);\" onclick=\"rate_post();\" onkeypress=\"rate_post();\" style=\"cursor: pointer; border: 0px;\" \/> (<strong>8<\/strong> votes, average: <strong>4.38<\/strong> out of 5)<br \/><span class=\"post-ratings-text\" id=\"ratings_2609_text\"><\/span><\/span><span id=\"post-ratings-2609-loading\" class=\"post-ratings-loading\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.sqlnethub.com\/wp-content\/plugins\/wp-postratings\/images\/loading.gif\" width=\"16\" height=\"16\" class=\"post-ratings-image\" \/>Loading...<\/span><\/p>\n<p>Reference: SQLNetHub.com (<a href=\"https:\/\/www.sqlnethub.com\">https:\/\/www.sqlnethub.com<\/a>)<\/p>\n<p>\u00a9 SQLNetHub<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C# SqlParameter is a handy feature allows you to safely pass a parameter to a SqlCommand object in .NET. A security best practice when writing .NET data access code, is to always use parameters in SqlCommand objects (whenever parameters are required of course). The reason for this, is that parameters help prevent SQL injection attacks. &#8230; <a title=\"Using the C# SqlParameter Object for Writing More Secure Code\" class=\"read-more\" href=\"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/\" aria-label=\"Read more about Using the C# SqlParameter Object for Writing More Secure Code\">Read more&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2627,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[32,20,139],"tags":[109,82],"class_list":["post-2609","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-net","category-c","category-programming","tag-data-access","tag-security"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using the C# SqlParameter Object for Writing More Secure Code - SQLNetHub<\/title>\n<meta name=\"description\" content=\"Learn how you can properly use the C# SqlParameter object for writing more secure data access code in .NET\/C# via a simple example.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using the C# SqlParameter Object for Writing More Secure Code - SQLNetHub\" \/>\n<meta property=\"og:description\" content=\"Learn how you can properly use the C# SqlParameter object for writing more secure data access code in .NET\/C# via a simple example.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/\" \/>\n<meta property=\"og:site_name\" content=\"SQLNetHub\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/groups\/sqlnethub\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-12T10:04:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-12-12T12:36:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"384\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Artemakis Artemiou\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@artemakis\" \/>\n<meta name=\"twitter:site\" content=\"@sqlnethub\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Artemakis Artemiou\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/\"},\"author\":{\"name\":\"Artemakis Artemiou\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#\\\/schema\\\/person\\\/51134ce3cf8216f020b20bf9e90da0f3\"},\"headline\":\"Using the C# SqlParameter Object for Writing More Secure Code\",\"datePublished\":\"2018-07-12T10:04:03+00:00\",\"dateModified\":\"2024-12-12T12:36:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/\"},\"wordCount\":1039,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sqlnethub.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg\",\"keywords\":[\"Data Access\",\"Security\"],\"articleSection\":[\".NET\",\"C#\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/\",\"url\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/\",\"name\":\"Using the C# SqlParameter Object for Writing More Secure Code - SQLNetHub\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sqlnethub.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg\",\"datePublished\":\"2018-07-12T10:04:03+00:00\",\"dateModified\":\"2024-12-12T12:36:17+00:00\",\"description\":\"Learn how you can properly use the C# SqlParameter object for writing more secure data access code in .NET\\\/C# via a simple example.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.sqlnethub.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sqlnethub.com\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg\",\"width\":640,\"height\":384,\"caption\":\"C# SqlParameter Example - SQLNetHub Blog\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/blog\\\/using-the-csharp-sqlparameter-object-writing-more-secure-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sqlnethub.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using the C# SqlParameter Object for Writing More Secure Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#website\",\"url\":\"https:\\\/\\\/www.sqlnethub.com\\\/\",\"name\":\"SQLNetHub\",\"description\":\"High-Quality Technical Training\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sqlnethub.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#organization\",\"name\":\"SQLNetHub\",\"url\":\"https:\\\/\\\/www.sqlnethub.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sqlnethub.com\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/SQLNetHubLogo-Website-Version.png\",\"contentUrl\":\"https:\\\/\\\/www.sqlnethub.com\\\/wp-content\\\/uploads\\\/2018\\\/01\\\/SQLNetHubLogo-Website-Version.png\",\"width\":180,\"height\":90,\"caption\":\"SQLNetHub\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/groups\\\/sqlnethub\",\"https:\\\/\\\/x.com\\\/sqlnethub\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/sqlserverdotnetblog\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sqlnethub.com\\\/#\\\/schema\\\/person\\\/51134ce3cf8216f020b20bf9e90da0f3\",\"name\":\"Artemakis Artemiou\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/70f03b30e240c249b681733e1901b3092b6147961ae97f6a6647cd6b7d087468?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/70f03b30e240c249b681733e1901b3092b6147961ae97f6a6647cd6b7d087468?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/70f03b30e240c249b681733e1901b3092b6147961ae97f6a6647cd6b7d087468?s=96&d=mm&r=g\",\"caption\":\"Artemakis Artemiou\"},\"description\":\"Artemakis Artemiou is a seasoned Senior Database and AI\\\/Automation Architect with over 20 years of expertise in the IT industry. As a Certified Database, Cloud, and AI professional, he has been recognized as a thought leader, earning the prestigious Microsoft Data Platform MVP title for nine consecutive years (2009-2018). Driven by a passion for simplifying complex topics, Artemakis shares his expertise through articles, online courses, and speaking engagements. He empowers professionals around the globe to excel in Databases, Cloud, AI, Automation, and Software Development. Committed to innovation and education, Artemakis strives to make technology accessible and impactful for everyone.\",\"sameAs\":[\"https:\\\/\\\/www.sqlnethub.com\",\"https:\\\/\\\/x.com\\\/artemakis\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using the C# SqlParameter Object for Writing More Secure Code - SQLNetHub","description":"Learn how you can properly use the C# SqlParameter object for writing more secure data access code in .NET\/C# via a simple example.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/","og_locale":"en_US","og_type":"article","og_title":"Using the C# SqlParameter Object for Writing More Secure Code - SQLNetHub","og_description":"Learn how you can properly use the C# SqlParameter object for writing more secure data access code in .NET\/C# via a simple example.","og_url":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/","og_site_name":"SQLNetHub","article_publisher":"https:\/\/www.facebook.com\/groups\/sqlnethub","article_published_time":"2018-07-12T10:04:03+00:00","article_modified_time":"2024-12-12T12:36:17+00:00","og_image":[{"width":640,"height":384,"url":"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg","type":"image\/jpeg"}],"author":"Artemakis Artemiou","twitter_card":"summary_large_image","twitter_creator":"@artemakis","twitter_site":"@sqlnethub","twitter_misc":{"Written by":"Artemakis Artemiou","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#article","isPartOf":{"@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/"},"author":{"name":"Artemakis Artemiou","@id":"https:\/\/www.sqlnethub.com\/#\/schema\/person\/51134ce3cf8216f020b20bf9e90da0f3"},"headline":"Using the C# SqlParameter Object for Writing More Secure Code","datePublished":"2018-07-12T10:04:03+00:00","dateModified":"2024-12-12T12:36:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/"},"wordCount":1039,"commentCount":0,"publisher":{"@id":"https:\/\/www.sqlnethub.com\/#organization"},"image":{"@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg","keywords":["Data Access","Security"],"articleSection":[".NET","C#","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/","url":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/","name":"Using the C# SqlParameter Object for Writing More Secure Code - SQLNetHub","isPartOf":{"@id":"https:\/\/www.sqlnethub.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg","datePublished":"2018-07-12T10:04:03+00:00","dateModified":"2024-12-12T12:36:17+00:00","description":"Learn how you can properly use the C# SqlParameter object for writing more secure data access code in .NET\/C# via a simple example.","breadcrumb":{"@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#primaryimage","url":"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg","contentUrl":"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/07\/c-sharp-sqlparameters-sqlnethub-blog-article.jpg","width":640,"height":384,"caption":"C# SqlParameter Example - SQLNetHub Blog"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlnethub.com\/blog\/using-the-csharp-sqlparameter-object-writing-more-secure-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlnethub.com\/"},{"@type":"ListItem","position":2,"name":"Using the C# SqlParameter Object for Writing More Secure Code"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlnethub.com\/#website","url":"https:\/\/www.sqlnethub.com\/","name":"SQLNetHub","description":"High-Quality Technical Training","publisher":{"@id":"https:\/\/www.sqlnethub.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlnethub.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.sqlnethub.com\/#organization","name":"SQLNetHub","url":"https:\/\/www.sqlnethub.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlnethub.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/01\/SQLNetHubLogo-Website-Version.png","contentUrl":"https:\/\/www.sqlnethub.com\/wp-content\/uploads\/2018\/01\/SQLNetHubLogo-Website-Version.png","width":180,"height":90,"caption":"SQLNetHub"},"image":{"@id":"https:\/\/www.sqlnethub.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/groups\/sqlnethub","https:\/\/x.com\/sqlnethub","https:\/\/www.youtube.com\/user\/sqlserverdotnetblog"]},{"@type":"Person","@id":"https:\/\/www.sqlnethub.com\/#\/schema\/person\/51134ce3cf8216f020b20bf9e90da0f3","name":"Artemakis Artemiou","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/70f03b30e240c249b681733e1901b3092b6147961ae97f6a6647cd6b7d087468?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/70f03b30e240c249b681733e1901b3092b6147961ae97f6a6647cd6b7d087468?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/70f03b30e240c249b681733e1901b3092b6147961ae97f6a6647cd6b7d087468?s=96&d=mm&r=g","caption":"Artemakis Artemiou"},"description":"Artemakis Artemiou is a seasoned Senior Database and AI\/Automation Architect with over 20 years of expertise in the IT industry. As a Certified Database, Cloud, and AI professional, he has been recognized as a thought leader, earning the prestigious Microsoft Data Platform MVP title for nine consecutive years (2009-2018). Driven by a passion for simplifying complex topics, Artemakis shares his expertise through articles, online courses, and speaking engagements. He empowers professionals around the globe to excel in Databases, Cloud, AI, Automation, and Software Development. Committed to innovation and education, Artemakis strives to make technology accessible and impactful for everyone.","sameAs":["https:\/\/www.sqlnethub.com","https:\/\/x.com\/artemakis"]}]}},"_links":{"self":[{"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/posts\/2609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/comments?post=2609"}],"version-history":[{"count":1,"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/posts\/2609\/revisions"}],"predecessor-version":[{"id":29515,"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/posts\/2609\/revisions\/29515"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/media\/2627"}],"wp:attachment":[{"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/media?parent=2609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/categories?post=2609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlnethub.com\/wp-json\/wp\/v2\/tags?post=2609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}