.net

How can windows services interact with each other?

Let's say I have two windows services running. One service is 'Polling' - it polls the database for print jobs. As soon as the new print job is found, another service - 'Printing' - must send the job to the printer. (Why I can not do it with one service is a separate issue, let's just say there is a reason for that). The simple solutio...

Generating Clean Business Object Classes from a horrible data source

I'm starting with a blank slate for a layer of business/entity classes, but with an existing data source. Normally this would be cake, fire up Entity Framework, point it at the DB, and call it a day, but for the time being, I need to get the actual data from a third party vendor data source that... Can only be accessed from a generic O...

Code is causing crash (vb .net)

I have some code and it crashes upon execution, what seems to be wrong? Imports WMEncoderLib Imports WMPREVIEWLib Imports System.IO Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() ''//This call is required by the Windows Form...

how to edit my connection string to work with System.Data.SqlClient?

Hi, i am a newbie programmer, and i have a problem with sqldatasource. In my project, i have a database called "KFS". I have a gridview and sqldatasource as gridview's datasource. I have a connection string like that: "KFSConnectionString" connectionString="Data Source=.\sqlexpress;Initial Catalog=KFS;Integrated Security=True" provi...

WCF and <identity impersonate="true" />

Hi there, What is the difference between these two lines of web.config code 1. <identity impersonate="true" /> 2. <identity impersonate="true" userName="MyUserName" password="MyPassword"/> Where MyuserName and MyPassword are my windows credentials. If you have IIS setup to use windows credentials shouldn't "1." pass in my windows ...

Linq to SQL: Select categories that have no subcategories

I need to grab all categories that don't have subcategories 1 ^--1.1 ^--1.2 ^--1.2.3 2 ^--2.1 3 In this example I would want to get [1.1], [1.2.3], [2.1] and [3]. My Categories table looks like this: CategoryID | CategoryName | ParentID I figure I should be selecting all the categories where it's CategoryID isn't used in an...

programming for 64-bit asp.net

Given a .NET 3.5 programming and client-use environment with Windows Vista. What are the implications for programming for a 64 bit OS under the below circumstances? Please specify whether there are issues of functionality or optimization - i.e. will it work and can it be made to work better in 64-bit environment. 1) You are developing...

How to bind a WinForm textbox to update on TextChanged instead of LostFocus

I am binding a textbox to a property on an object, and would like the property to be updated on the TextChanged event and not the default LostFocus event. How would this be done? It would be nice if there was a property on the Binding object to designate which event should be used. ...

How to force a .NET application to cold-run

Hi, i am trying to run performance counters on a .NET application and i would like to ensure the environment is the same between rebuilds. So far i can only think that the best way is to reboot the pc before each test to make all test COLD. is there another way to achive the same environment without rebooting each time? ...

Trigger not launched from interface

Hello: I have a table with an after update trigger in SQL 2005. If I update directly with SQL QUERY the trigger runs ok. This table is connected using a dataset and tableadapter to a DXDBGrid (Dev. Express). If the user updates the grid, the underlying data is updated, but the trigger is not launched. I've a PK on table, auto-generat...

Store whole dataset to database

How to store a complete dataset into database without having to do it table by table and row by row. ...

How to troubleshoot "Property value is invalid. Make sure the value is typed correctly."?

I'm calling a COM library from .NET through a interop assembly and getting the following error: System.Runtime.InteropServices.COMException(0x80040200): Internal error (ADODB.Connection, -2147467259, Property value is invalid. Make sure the value is typed correctly.) I have a test and a production version of the same external system. W...

Upsert with .net sqladapter

Dim sSelect As String = _ "SELECT * FROM Contacts" & _ " WHERE DataSetID = @DataSetID AND ID >= @FirstID AND ID <= @LastID ORDER BY ID" Dim dsDBFiles As New DataSet() Dim cmd As New SqlClient.SqlCommand(sSelect, m_connection) cmd.Parameters.Add("@FirstID", SqlDbType.Int).Value = nFirstID ...

Data Bind a WPF Listbox?

How do i databind a listbox to a List that i have in the containing window's class file? I looked and there's an ItemsSource property that i can set but i'm not sure if this is what i want, nor am i sure what to set it to. ...

Fluent code for mapping an IDictionary<SomeEntity, int>?

I'm trying to figure out how to map an IDictionary property in fluent 1.0 RTM. From my understanding this translates to a ternary association. Example: class Bar { public IDictionary<SomeEntity, int> Foo {get; set;} } Bar.hbm.xml would then contain: <map name="Foo" table="BarFooTable"> <key column="..."/> <index-many-to...

web.config custom ConfigurationSection and unnecessary verbosity

Unless I am doing something wrong, the way I am supposed to use ConfigurationSection, ConfigurationElement and ConfigurationElementCollection, would require me to format my configuration section like so: <serviceAuthorization> <credentials> <login username="system" password="password" mode="include"> <services> ...

Latest Version of Lucene .Net

Can anybody please inform me, which is the latest version of Lucene .Net.. please be sure Thanking you ...

Smart Device Framework highlights?

Hi, I am thinking about introducing OpenNETCF's Smart Device Framework at my company, as I like the SafeHandle class. But I would like to know what else is good in it. Anyone found a good blogpost or something with the most useful classes and functions in OpenNETCF? ...

NHibernate Search - _hibernate_class problem

I have this mapped class called as "Client" used for NHibernate and is decorated with Lucene search attributes. When NHibernate.Search does initial indexing, I found through Luke that the special property _hibernate_class shows following value for some documents(index docs)... CProxyTypeABC_Common_EntitiesClientEntities_NHibernate_Proxy...

How to read from database and write into text file with C#?

How to read from database and write into text file? I want to write/copy (not sure what to call) the record inside my database into a text file. One row record in database is equal to one line in the text file. I'm having no problem in database. For creating text file, it mentions FileStream and StreamWriter. Which one should I use? ...