Experiences with the Poll Module
Connection string We've had to alter a few things with the Poll Module which involved us using SQL database instead of an Access database. This was because we noticed after adding a poll the vote count was always one vote behind. Upon changing the database to SQL, we had problems connecting to the database. We were testing the Poll using two websites - one that has a named instance and one without. The connection string settings were set from the Sitecore start menu > All applications > Poll Module > Settings. Connection string - with no named instance - this needed a backslash after the Data Source: Provider=sqloledb;Persist Security Info=true;Data Source=<xx>\;Initial Catalog=<xx>;User ID=<xx>;Password=<xx>; The connection string above worked however on our client's environment, the Persist Security Info had to be removed as there were conflicts with permissions. Connection string - with a named instance - no backslash needed: Provider=sqloledb;Persist Security Info=true;Data Source=<xx\xx>;Initial Catalog=<xx>;User ID=<xx>;Password=<xx>; For some reason we couldn't get this connection string to consistently work. We decided to alter DatabaseContext.cs and use an SqlConnection instead of Oledb. New string: Persist Security Info=true;Data Source=<xx\xx>;Initial Catalog=<xx>;User ID=<xx>;Password=<xx>; Whether the Data Source had a named instance or not - the backslash was not needed and the Provider was removed. This worked fine.
Styles We had to alter Voting.cs to render the HTML. RenderVotingContent() used the same ID attribute for all of the radio button options - which caused HTML validation errors.
.. Modules.Poll.Domain.PollOptionItem[] opts = CurrentPoll.GetOptions(); string optsGuid = ""; string optsTitle = ""; for (int i = 0; i < opts.Length; i++) { optsGuid = opts[i].ID.Guid.ToString(); optsTitle = opts[i].Title; RenderVotingContentOptions(this.ClientID + "_voteList" + (i + 1).ToString(), writer, optsGuid, optsTitle); } ..
Overall it involved a lot of changes to suit our requirements. It was a bit frustrating not having the connection working on our client's end thus it involved us making quick last minute changes.














