Tag: c#

Not find DataSource in .rdl report

Created a report in SQL Server Report Builder. All good! Trying to bring it in ReportViewer, but writes an error For the data source ‘DataSet1’ has not been set an instance of the data source. Code: private void button1_Click(object sender, EventArgs e) { reportViewer1.LocalReport.ReportPath = @”C:\MyReport.rdl”; reportViewer1.ProcessingMode = ProcessingMode.Local; ReportParameter rp = new ReportParameter(“code”,”100″); reportViewer1.LocalReport.SetParameters(rp); […]

Managing user specific settings in ASP MVC Views, and database

I’m rolling my own currently and tried NINI. Is there a simpler/better modular package/process to managing user settings. Where I can bubble the settings up to the user as his editable view. Similar to app settings (I’ve used app setting, but they are fairly global). Does ASP MVC 5 OOB natively provide a functionality to […]

WPF / local SQL Server CE 4.0 / Underling provider failed on open

I have WPF application that is using EF6 with local SQL Server Compact Edition 4.0 database. I’m using private deployment for SQL Server Compact Edition. Application works without any errors on 99% of the workstations but I’m encountering a problem on the single one. When I launch the application I receive MessageBox with below error: […]

NopCommerce Plugin Uninstall

I’m currently developing a plugin to add a banner to specific pages, where i am using NopCommerces, official guide on how to develop a plugin. However when I carried out an uninstall and a reinstall of the plugin, I still have access to my old images. As the uninstall has only dropped certain data in […]

Generating Crystal Report Using Entity Framework in MVC5

Please I have an application that I have built and am trying to integrate crystal report using what i have query from my controller this is the report generator Controller public ActionResult ExportReport(int CategoryId, string DateFrom, string DateTo) { DateTime StartDate = Convert.ToDateTime(DateFrom); DateTime EndDate = Convert.ToDateTime(DateTo); ReportDocument read = new ReportDocument(); if (CategoryId == […]

Getting an error while connecting Sql server using cmd. Please helpp

I’m Completely new to sql server database and I don’t where to start my server. After googleing I started server selecting an option from Sql server configuration manager. Now as I type sqlcmd into command prompt. It gives me the following error: Sqlcmd: Error: Microsoft SQL SErver Native Client 11.0 : Named Pipes Provider : […]

How to store a recursive model with entity framework 5.0

I’m new to entity framwork and trying to store the following Model to a Database. I have watched this tutorial. I want to store the following model to the database using code first, but I couldn’t get it store this recursive structure. It only stores the initial root node. My model looks like this: public […]

Application can't change DNS to IP on SQL Server connection

I have a weird issue in C#. I have SQL Server database hosted remotely. My C# application is connecting to this database using DNS name as Server name. Let’s say: “myremoteserver.com”. I use connection string etc. If I run my app from Visual Studio it’s working correctly. Connection is made, can do what I want […]

Best practice for dynamically building variable length IN SQL clause in C#

Recently I found myself in C#, doing some SQL. This is not exactly my area of expertise. I wrote some code that looks pretty ugly, and am failing to find a better solution anyplace. Many of the answers here on SO pose SQL injection risks, and are essentially doing the same thing im doing in […]

Protecting client data

A little background. We have a web based system that allows clients to enter/upload confidential data. We are currently using SQL Server 2005 and Column Level Encryption. The user creates a key that’s used to encrypt their data(encryptbypassphrase function in SQL). We do not store their key anywhere. If the user loses or forgets their […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.