Search Results

Search found 40 results on 2 pages for 'csetzkorn'.

Page 2/2 | < Previous Page | 1 2 

  • exact full text search - sql server 2005

    - by csetzkorn
    Hi, Is it possible to do an 'exact full text search' with CONTAINS. I have removed all noise words etc. but the dbms still seems to manipulate the 'exact word' (e.g. 'j-blade - blade'). Can I disable this? Thanks. Christian PS: I would like to avoid like because it is too slow and with exact I mean that the text contains the exact word.

    Read the article

  • hidden form element not bound?

    - by csetzkorn
    Is it standard/intended behaviour that the value of a hidden form field is not bound to the view model (nor is a query string value)? Example: <%= Html.Hidden("test", "13" )%> if my poco view model contains a property test it should be bound shouldn't it?! i have to set it explicitely in the controller at the moment which kind of defeats the objective doesn't it? bla( formviewmodel m, string test) { m.test = test; } any feedback appreciated. thanks! christian

    Read the article

  • insert into several inheritance tables with OUTPUT - sql servr 2005

    - by csetzkorn
    Hi, I have a bunch of items – for simplicity reasons – a flat table with unique names seeded via bulk insert: create table #items ( ItemName NVARCHAR(255) ) The database has this structure: create table Statements ( Id INT IDENTITY NOT NULL, Version INT not null, FurtherDetails varchar(max) null, ProposalDateTime DATETIME null, UpdateDateTime DATETIME null, ProposerFk INT null, UpdaterFk INT null, primary key (Id) ) create table Item ( StatementFk INT not null, ItemName NVARCHAR(255) null, primary key (StatementFk) ) Here Item is a child of Statement (inheritance). I would like to insert items in #items using a set based approach (avoiding triggers and loops). Can this be achieved with OUTPUT in my scenario. A ‘loop based’ approach is just too slow where I use something like this: insert into Statements (Version, FurtherDetails, ProposalDateTime, UpdateDateTime, ProposerFk, UpdaterFk) VALUES (1, null, getdate(), getdate(), @user_id, @user_id) etc. This is a start for the OUTPUT based approach – but I am not sure whether this would work in my case as ItemName is only inserted into Item: insert into Statements ( Version, FurtherDetails, ProposalDateTime, UpdateDateTime, ProposerFk, UpdaterFk ) output inserted.Id ... ??? Thanks. Best wishes, Christian

    Read the article

  • xml2struct cannot access element(s)

    - by csetzkorn
    I try to use this: xml2struct when I use this xml: <XMLname attrib1="Some value"> <Element>Some text</Element> <DifferentElement attrib2="2">Some more text</DifferentElement> <DifferentElement attrib3="2" attrib4="1">Even more text</DifferentElement> </XMLname> I can create a struct: test = xml2struct('C:\bla\bla.xml'); (tested it with class(test)) It looks like this: test = Name: 'XMLname' Attributes: [1x1 struct] Data: '' Children: [1x7 struct] But I cannot access: test.XMLname.Element.Text I get: ??? Reference to non-existent field 'XMLname'. Any ideas?

    Read the article

  • NHibernate - fast way to clear out database

    - by csetzkorn
    Hi, I intend to perform some automated integration tests. This requires the db to be put back into a 'clean state'. Is this the fastest/best way to do this: var cfg = new Configuration(); cfg.Configure(); cfg.AddAssembly("Bla"); new SchemaExport(cfg).Execute(false, true, false); Thanks. Christian

    Read the article

  • asp.net mvc default model binding problem

    - by csetzkorn
    I have some problems with ASP.NET MVC’s default model binder. The View contains HTML like this: <input name="SubDTO[0].Id" value="1" type="checkbox"> <input name="SubDTO[1].Id" value="2" type="checkbox"> This is my simplified ‘model’: public class SubDTO { public virtual string Id { get; set; } } public class DTO { public List<SubDTO> SubDTOs { get; set; } public DTO() { SubDTOs = new List< SubDTO>(); } } All this works fine if the user selects at least the first checkbox (SubDTO[0].Id). The controller ‘receives’ a nicely initialised/bound DTO. However, if the first check box is not selected but only, for example, SubDTO[1].Id the object SubDTOs is null. Can someone please explain this ‘strange’ behaviour and how to overcome it? Thanks. Best wishes, Christian

    Read the article

  • shreding xml column

    - by csetzkorn
    Hi, I have a XML column which contains XML like this: <Set> <Element> <ID> 1 </ID> <List> <ListElement> <Part1> ListElement 1 </Part1> </ListElement> <ListElement> <Part1> ListElement2 </Part1> </ListElement> </List> </Element> <Element> <ID> 2 </ID> <List> <ListElement> <Part1> ListElement3 </Part1> </ListElement> <ListElement> <Part1> ListElement4 </Part1> </ListElement> </List> </Element> </Set> I would like to shred this into a relation table containing this: ID, ListElement 1, ListElement1 1, ListElement2 2, ListElement3 2, ListElement4 I am able to obtain the content of the Parts using something like this: select List.value('(Part1/text())[1]', 'varchar(max)') as test from Table CROSS APPLY xml.nodes('// Element/List/ListElement') AS List(List) but I have not yet achieved to keep the ‘foreign key’ (the ID value). Thanks. Best wishes, Christian

    Read the article

  • testing the controller in asp.net mvc

    - by csetzkorn
    Hi, I would like to test the validation of submitted DTO. This is the bare bone of a controller create action: [AcceptVerbs(HttpVerbs.Post)] public RedirectToRouteResult Create(SomeDTO SomeDTO) { SomeObject SomeObject = null; try { SomeObject = this.RepositoryService.getSomeObjectRepository().Create(SomeDTO, this.RepositoryService); } catch (BrokenRulesException ex) { ex.AddModelStateErrors(ModelState, "Model"); } catch (Exception e) { ModelState.AddModelError("Exception", e.Message); } TempData["ViewData"] = ViewData; TempData["SomeDTO "] = SomeDTO; return ModelState.IsValid ? RedirectToAction("SomeObjectDetail", new { Id = SomeObject.Id }) : RedirectToAction("Form"); } The mechanics , although not relevant, is as follows: I have a strongly typed view = form which submits a dto to this action which either returns the form or the details page of the created object. I would like to unit test whether the Model contains certain key/errorMessage combinations given some invalid dto. Did someone do similar stuff? Any pointers would be very much appreciated. Thanks. Best wishes, Christian

    Read the article

  • SOA, unobtrusive JavaScript

    - by csetzkorn
    Hi, Let us say I have a restful web service which can deal with DTOs in json format to perform a CRUD operation. Let us also say I use jquery in an unobtrusive way to serialise my form at the frontend using: JSON.stringify What can I do to ensure that everything works even if JavaScript is switched off? Thanks. Best wishes, Christian

    Read the article

  • UK Postcode -> Easting, Northing

    - by csetzkorn
    Hi, Is anyone aware of a free web service which allows me to translate uk postcodes to easting and northings. I found a website where I can use screen scraping but perhaps there is a nice FREE web service out there. Thanks! Christian

    Read the article

  • testing controller action which returns RedirectToRouteResult

    - by csetzkorn
    Hi, I have an action in my controller: RedirectToRouteResult Create(UserDTO UserDTO) Which at some point decides with which HTML to respond after a post request by redirecting to an action: return ModelState.IsValid ? RedirectToAction("ThanksCreate") : RedirectToAction("Register"); In my unit tests I would like to get hold of the ‘views’ modelstate somehow like this: var modelState = result.ViewData.ModelState; Assert.IsFalse( modelState.IsValid ); where ‘result’ (ViewResult) is the result of the action ‘Create’ depending on the submitted DTO. My dilemma is that my action ‘returns’ a RedirectToRouteResult which I thought is quite nice but it might not be testable or is it? How could I get hold of the ModelState in my scenario? Thanks. Best wishes, Christian enter code here

    Read the article

  • insert data into several tables

    - by csetzkorn
    Let us say I have a table (everything is very much simplified): create table OriginalData ( bla char(10) not null ) And I would like to insert its data (set based!) into two tables which model inheritance create table Statements ( Id int IDENTITY NOT NULL, ProposalDateTime DATETIME null ) create table Items ( StatementFk INT not null, ItemName NVARCHAR(255) null, primary key (StatementFk) ) Statements is the parent table and Items is the child table. I have no problem doing this with one row which involves the use of IDENT_CURRENT but I have no idea how to do this set based (i.e. enter several rows into both tables). Thanks. Best wishes, Christian

    Read the article

< Previous Page | 1 2