Source

stacky / trunk / data / users-suggested-edits-zEmmHFFFSA9duRzDh1SRb+ZGJZQ=.txt

Full commit
https://api.stackexchange.com/2.0/users/646/suggested-edits?order=desc&sort=creation&site=stackoverflow
{"items":[{"suggested_edit_id":129530,"post_id":5887067,"post_type":"question","title":"Using AWS to do product lookup by UPC to get the products ASIN","comment":"The title had a mis spelling for ASIN making it hard to search for","creation_date":1320384765,"approval_date":1320386165,"proposing_user":{"user_id":646,"display_name":"Luke Foust","reputation":981,"user_type":"registered","profile_image":"http://graph.facebook.com/558081755/picture?type=large","link":"http://stackoverflow.com/users/646/luke-foust"}},{"suggested_edit_id":97976,"post_id":508475,"post_type":"answer","body":"<p>To my knowledge you can't use named parameters with the OleDbParameter.</p>\n\n<p>Your insert should look like:</p>\n\n<pre><code>string sql = \"INSERT INTO DVD (titel, locatie)VALUES(?, ?)\";\n</code></pre>\n\n<p>And then you have to add OleDbParameters in the correct order. The names are not used.</p>\n\n<p><a href=\"http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbparameter.aspx\" rel=\"nofollow\">http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbparameter.aspx</a></p>\n\n<p>Edit:</p>\n\n<p>Untested code below but here is an example of how I would do it.</p>\n\n<pre><code>using(OleDbConnection connection = new OleDbConnection(CONNECTION_STRING))\n{\n  using(OleDbCommand command = connection.CreateCommand())\n  {\n    command.CommandType = CommandType.Text;\n    command.CommandText = \"INSERT INTO DVD(title,locatie)VALUES(?,?)\";\n    command.Parameters.Add(\"@p1\", OleDbType.VarChar, 1).Value = M.Title;\n    command.Parameters.Add(\"@p2\", OleDbType.VarChar, 255).Value = M.Location;\n\n    connection.Open();\n    int ret = command.ExecuteNonQuery();\n  }\n}\n</code></pre>\n","comment":"fixed bug in code sample as suggested by comment","creation_date":1314638902,"approval_date":1314639532,"proposing_user":{"user_id":646,"display_name":"Luke Foust","reputation":981,"user_type":"registered","profile_image":"http://graph.facebook.com/558081755/picture?type=large","link":"http://stackoverflow.com/users/646/luke-foust"}}],"quota_remaining":-4516,"quota_max":300}