.net-3.5

C# abstraction and database layer

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 09:50:57
问题 I am wondering what's a better way to abstract some of this code, into a simple DAL. At this time, I'm just patching the code and don't have time or need yet to use EF, Linq2Sql or any ORM right now. public string GetMySpecId(string dataId) { using (SqlConnection conn = new SqlConnection(this.MyConnectionString)) { conn.Open(); // Declare the parameter in the query string using (SqlCommand command = new SqlCommand(@"select ""specId"" from ""MyTable"" where ""dataId"" = :dataId", conn)) { //

Dependent properties

让人想犯罪 __ 提交于 2019-12-25 09:36:41
问题 I am new to WPF.. Can anyone tell.. What exactly the depentent properties means?.. How it differ from normal properties??? and can i edit the design page in asp 3.5 while am i running the application, because the same is possible in asp 2.0. 回答1: You'd use a DependencyProperty when you want to support the setting of the property from XAML code (rather than just procedurally) 回答2: Dependency properties depend on multiple providers for determining its value at any one point. These providers

The file name is not valid. Check the file name for the database. [ File name = file:\C:\Users\

一笑奈何 提交于 2019-12-25 07:46:55
问题 I have a windows CE application that uses SQL CE and .Net3.5 in MS VS 2008. when I run my application in mobile emulator every thing is OK and mobile application works fine. But when I run application.exe in Debug folder on my PC I see the error below! i Googled it , but couldn't find any solution. have anybody got a solution for it? This is my LongLongAddress\MyMobileApp\bin\Debug folder : 回答1: Yeah, I have a mistake that want to open a CF app on a PC !!! :) when i create a .cab file and

Return LINQ query to DataTable .NET 3.5?

孤街浪徒 提交于 2019-12-25 06:49:10
问题 I want to query two DataTables (populated by parsing Excel files) using LINQ and join them on a matching field, "UPC", as follows: Dim query = From c In dt.AsEnumerable() _ Join r In dtUnits.AsEnumerable() _ On c.Field(Of String)("UPC") Equals r.Field(Of String)("UPC") _ Select New With {.UPC = r.Field(Of String)("UPC")} Additionally, I want to copy this LINQ query result to a DataTable. I found a method CopyToDataTable() , but it is in .NET 4.5, and our server only supports .NET 3.5. What

Error when Parsing RSS

試著忘記壹切 提交于 2019-12-25 05:21:45
问题 I 'm trying to parse RSS feeds and then display them on my website. My code seems to work correctly when parsing techcrunch & arstechnica RSS. But when I try to parse HackerNews RSS I get the an error. XmlReader readXML; readXML = XmlReader.Create(GetURL()); SyndicationFeed News= SyndicationFeed.Load(readXML); readXML.Close(); return News; I get the following error on readXML = XmlReader.Create(GetURL()); geturl is the url for rss. The server committed a protocol violation. Section

Error when Parsing RSS

戏子无情 提交于 2019-12-25 05:21:17
问题 I 'm trying to parse RSS feeds and then display them on my website. My code seems to work correctly when parsing techcrunch & arstechnica RSS. But when I try to parse HackerNews RSS I get the an error. XmlReader readXML; readXML = XmlReader.Create(GetURL()); SyndicationFeed News= SyndicationFeed.Load(readXML); readXML.Close(); return News; I get the following error on readXML = XmlReader.Create(GetURL()); geturl is the url for rss. The server committed a protocol violation. Section

MySQL .Net Provider 5.2 does not show up in Data Source dialog of VS 2008 Express

笑着哭i 提交于 2019-12-25 05:09:38
问题 I have installed MySQL .NET data provider 5.2 (through it's installer) but I could not see the MySQL data provider in Data Source dialog of Database Explorer. I am using VS 2008 Express edition. Do you have any clues ? Regards, Jatan 回答1: VS 2008 Express (and VS 2005 Express too) doesn't allow you to use MySQL .Net Provider through the Data Source Dialog. The non-Express edition allow you to do the same. To use MySQL in VS Express, you will have to include a reference to the MySQL DLLs from

Disabling checkbox selections in VB .NET 2008 Winform Listview

一笑奈何 提交于 2019-12-25 04:33:53
问题 How do you disable additional checkbox selections/deselections without sacrificing the functionality of the ListView? I know you can call: ListView.Enabled = False, but that also disables any scrolling within it. For example: I have a timer that starts a backup based on the Listview items that are checked. After a certain time, I don't want the end-user to be able to click on any of the checkboxes within the listview (so I have a set number of items to backup), but I do want them to be able

.NET System.Drawing differences in Windows Server 2008R2 64bit compared to all other windows (image is broken in 2008R2-64 but not other Windows)

吃可爱长大的小学妹 提交于 2019-12-25 03:52:47
问题 I have been given a development PC that has Windows Server 2008R2 64bit (x86) installed, so it is used as a workstation. My development environment is VS2008 targeting .NET3.5 (YES, 2008 !!!) In our website (which is a few years old now) there is a in-house developed Captcha. To cut a long story short, the letters are not outputted on my dev machine 2008R2-64 but on all other windows (our test & live servers are 2003 64bit) and Virtual PC's (2008 32bit NOT R2, XP, Win7) they are. I have seen

Filesystemwatcher does not raise rename event handler in C# on Windows7

℡╲_俬逩灬. 提交于 2019-12-25 03:14:22
问题 I am using C# 3.5 on Windows 7. We have implemented a program with a FileSystemWatcher. Here, rename event is not raised. But it is working on a few systems. What could be causing this? 回答1: There may be a timing window in your code such that not all filesystem events are properly captured on all your systems. Can you post it? It is a 'feature' of the underlying Win32 API ReadDirectoryChangesW and hence FileSystemWatcher that under heavy load, events can get missed. There are mitigation