Daily Archives

Articles indexed Wednesday May 5 2010

Page 12/119 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Using SQLXML Bulk Load in .NET Environment - Error with One to Many relationship on Complex Type

    - by user331111
    Hi, I have an error when I am importing an XML file using SQLXMLBulkLoad, wondering if anyone could help. Error: Data mapping to column 'Attribute' was already found in the data. Make sure that no two schema definitions map to the same column Full files and details can be found here http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_26102239.html Exert from XSD: <sql:relationship name="EnvironmentDECAttributes" parent="Environment" parent-key="intEnvironmentID" child="DECAttributes" child-key="intEnvironmentID"/> <complexType name="Environment"> <sequence> <element name="ESANumber" minOccurs="0"> <annotation> <documentation> Environmentally Sensitive Area Number </documentation> </annotation> <simpleType> <restriction base="string"> <maxLength value="15"/> <whiteSpace value="collapse"/> </restriction> </simpleType> </element> <element name="Conditions" minOccurs="0" sql:relation="Conditions" sql:relationship="EnvironmentConditions"> <complexType> <sequence> <element name="Condition" type="vms:EnvironmentalConditions" minOccurs="0" maxOccurs="5"/> </sequence> </complexType> </element> <element name="DECDistrict" minOccurs="0"> <annotation> <documentation> Department of Environment &amp; Conservation District </documentation> </annotation> <simpleType> <restriction base="string"> <maxLength value="31"/> <whiteSpace value="collapse"/> </restriction> </simpleType> </element> <element name="DECAttributes" minOccurs="0" maxOccurs="1" sql:relation="DECAttributes" sql:relationship="EnvironmentDECAttributes"> <complexType> <sequence> <element name="Attribute" type="vms:DECAttributes" minOccurs="0" maxOccurs="unbounded" sql:field="Attribute"> <annotation> <documentation> Department of Environment &amp; Conservation attributes. </documentation> </annotation> </element> </sequence> </complexType> </element> </sequence> </complexType> Exert from XML: <Environment> <DECAttributes> <Attribute>WA</Attribute> <Attribute>SA</Attribute> </DECAttributes> </Environment> Any help/ comments would be appreciated Thanks C

    Read the article

  • How to implement DisplayMemberPath for my Wpf UserControl?

    - by Bevan
    I'm writing a WPF User Control for my application, wrapping a ListBox and a few other items. The ListBox has a new ItemTemplate that presents four pieces of information for each item in my list. I can hard code each of the four bindings to specific properties on my list items and they display fine. However, I want my UserControl to be a bit more flexible. On ListBox and ComboBox there is a property DisplayMemberPath (inherited from ItemsControl) that seems to "inject" the appropriate property binding into the standard ItemTemplate. How do I achieve the same result with my user control? I'd like to set up four new properties to allow configuration of the information displayed: public string LabelDisplayPath { get; set; } public string MetricDisplayPath { get; set; } public string TitleDisplayPath { get; set; } public string SubtitleDisplayPath { get; set; } Reviewing ItemsControl.DisplayMemberPath with Reflector seems to go down the rabbit hole, I haven't been able to fathom how it works. Also, if I'm completely off course - and there's another, more "WPF" technique that I should be using instead, please point me in that direction.

    Read the article

  • Latex change color of intext citing with hyperref package and natbib

    - by Thomas
    I am using the natbib and hyperref package in conjunction with my latex document. I would like to change to the color of my hyppereferenced citations (the box around the citation) from the ugly baseline green to a more muted (violet or navy blue). However, in using the suggested code to do this, I can not get the citation link colors to change. My code is as follows \usepackage[usenames,dvipsnames]{color} \usepackage[round]{natbib} \usepackage[hyperfootnotes=false]{hyperref} \usepackage[hyperfootnotes=false]{hyperref} \hypersetup{ colorlinks=false, citecolor=Violet, linkcolor=Red, urlcolor=Blue} \begin{document} \bibliographystyle{apsr} \bibliography{exp_final} \end{document} However, when I compile (I compiled multiple times to make sure) this my pdf file looks the same as if I had excluded the formatting in the hypersetup (still the same ugly green). I would also like to box the footnote citations as well. Any ideas or help would be much appreciated. Thanks, Thomas

    Read the article

  • GridView in ASP.NET 2.0

    - by Subho
    How can I populate an editable Grid with data from different tables from MSSQL Server'05 writing a code behind function??? I have used: Dim conn As New SqlConnection(conn_web) Dim objCmd As New SqlDataAdapter(sql, conn) Dim oDS As New DataSet objCmd.Fill(oDS, "TAB") Dim dt As DataTable = oDS.Tables(0) Dim rowCount As Integer = dt.Rows.Count Dim dr As DataRow = dt.NewRow() If rowCount = 0 Then e.DataSource = Nothing e.DataBind() e.Focus() Else e.DataSource = dt e.DataBind() End If

    Read the article

  • problem in reading textbox value in li

    - by user269431
    I have a ul as follows: It can`t read the text values neither with val() nor text(). Can anyone help please <ul id="mylist"> <li id="1"><input type = "text" value= "aaaaa" /></li> <li id="2"><input type = "text" value= "bbbb" /></li> <li id="3"><input type = "text" value= "ccc" /></li> <li id="5"><input type = "text" value= "dddd" /></li> </ul><button id="Button1">Add Another2</button> var values = []; $(document).ready(function() { $("#Button1").click(function() { $( "#mylist li text").each(function() { alert($(this).text()); values.push($(this).text()); }); }); });

    Read the article

  • .NET Data Adapter Timeout SP Issue

    - by A-B
    We have a SQL Server stored procedure that runs fine in SQL Manager directly, does a rather large calculation but only takes 50-10 seconds max to run. However when we call this from the .NET app via a data adapter it times out. The timeout however happens before the timeout period should, we set it to 60 seconds and it still times out in about 20 seconds or less. I've Googled the issue and seen others note issues where a SP works fien directly but is slow via a data adpater call. Any ideas on how to resolve this?

    Read the article

  • Returning unique values of a multi-dimensional array with CodeIgniter PHP

    - by Michael Bradley
    Hi - I'm developing a property rentals website. The search results page will contain a list of property results. It is my intention to redefine the results, say by town, country, property type etc. So let's say for example the user searches 'France'. All of the relative properties will be returned and displayed in a list. However, I also need to reuse this array, to display only unique town names from the search results array. e.g. Montpellier, Lyon, Rennes, Nice etc. The idea is when use user click on 'Nice', only the 'Nice' properties would return. I would also like to display how many properties are in that town. The closest example as to what I want to achieve. http://www.miaandmaggie.com/dog-collars-leashes.html Any ideas how I can use my search array to display the unique towns of the search? Many thanks! M

    Read the article

  • Can extension methods be applied to interfaces?

    - by Greg
    Hi, Is it possible to apply an extension method to an interface? (C# question) That is for example to achieve the following: create an ITopology interface create an extension method for this interface (e.g. public static int CountNodes(this ITopology topologyIf) ) then when creating a class (e.g. MyGraph) which implements ITopology, then it would automatically have the Count Nodes extension. This way the classes implementing the interface would not have to have a set class name to align with what was defined in the extension method.

    Read the article

  • Retrieve COM ProgID from exe without registering it

    - by mangelo
    Background: I would like to extract the COM data from a VB6 application so I can register it correctly (according to Microsoft best practice) the application. I am using WiX 3.0 and heat.exe will not extract the data (known issue with heat) and I do not have ready access to the associated TLB file. The VB6 application does not have compatibility turned on so it regenerates the COM GUIDs every build (They want to have the application be able to run side by side with an older version.) I created a C# application that will collect the TypeLib, interface and CoClass information from the VB6 application without registering it and create a wxs file for candle to use. My company has several other older applications like this and I would like to make it a more generic solution. The Issues: 1.Is there a way to collect the 'true' ProgID (programmer intended one) from the application with out the project or TLB file and without registering it? 2.Is there a way to find out the intended Threading Model from a DLL without registering it? (I intend that it can handle all COM active items, might as well be complete) Thank you.

    Read the article

  • How do you enable Remote Connection with SQL Server 2008 w/o Installing Management Studio?

    - by danmine
    I'm having a rather tough time finding information on this since almost everything I read requires Management Studio installed in the server which I prefer not to do. Also, to connect to it using SQL Server Management Studio installed on the client, are these settings ok? ServerName: 10.232.234,1433\SQLEXPRESS Login: sa Password: password Yes, I want to specify the port number in the client side since I have to go through a few firewalls which I have poke holes through to get to the SQL Default port 1433.

    Read the article

  • Realtime MS SQL Database transfer

    - by user34402
    Hello, I have MS SQL 2005 Standard that is used actively (new data is added every minute). I need to transfer it to another server (new hosting provider), without losing the data and without downtime. Is there any way to do it?

    Read the article

  • Ruby on Rails: reducing complexity of parameters in a RESTFul HTTP POST request (multi-model)

    - by randombits
    I'm using cURL to test a RESTFul HTTP web service. The problem is I'm normally submitting a bunch of values normally like this: curl -d "firstname=bob&lastname=smith&age=25&from=kansas&someothermodelattr=val" -H "Content-Type: application/x-www-form-urlencoded" http://mysite/people.xml -i The problem with this is my controller will then have code like this: unless params[:firstname].nil? end unless params[:lastname].nil? end // FINALLY @person = People.new(params[:firstname], params[:lastname], params[:age], params[:from]) etc.. What's the best way to simplify this? My Person model has all the validations it needs. Is there a way (assuming the request has multi-model parameters) that I can just do: @person = People.new(params[:person]) and then the initializer can take care of the rest?

    Read the article

  • Updating / refreshing a live geojson layer | JSON & JS Variable

    - by Ozaki
    TLDR I am trying to get my geoJSON layer to update, currently it will 1. Create the vector mark, 2. Remove the vector mark, 3. Set the JS variable for lat and lon, 4. Unset the variable??? :S Hey S O. I have a geojson layer set up as follows: //GeoJSON Layer// var layer1 = new OpenLayers.Layer.GML("My GeoJSON Layer", "coordinates", {format: OpenLayers.Format.GeoJSON, styleMap: style_red}); My features are set up as follows: var latitude = 0.0; // as 0.0 it will draw the point in. var longitude = 0.0; // as 0.0 it will draw the point in. //var longitude = getlongitude; where getlongitude = JSON string of longitude. var point = new OpenLayers.Geometry.Point(longitude, latitude); pointFeature = new OpenLayers.Feature.Vector(point, null, style_red); var style_red = OpenLayers.Util.extend({}, layer_style); style_red.strokeColor = "red"; style_red.fillColor = "black"; style_red.fillOpacity = 0.5; style_red.graphicName = "circle"; style_red.pointRadius = 3.8; style_red.strokeWidth = 2; style_red.strokeLinecap = "butt"; and my layer updating function: function UpdateLayer(){ var p = new OpenLayers.Format.GeoJSON({ 'internalProjection': new OpenLayers.Projection("EPSG:900913"), 'externalProjection': new OpenLayers.Projection("EPSG:4326") }); var url = "coordinates"; OpenLayers.loadURL(url, {}, null, function(r) { var f = p.read(r.responseText); map.layers[2].destroyFeatures(); map.layers[2].addFeatures(pointFeature); }); setTimeout("UpdateLayer()",1000) } Any idea what I am doing wrong or what I am missing? Edit1 It now removes the feature (was map.layers[1]) previously... But will not add the new feature.. Edit2 I managed to get it to redraw a point but not with live data. It should draw the point at what (latitude) & (longitude) are equal to. I am trying to set latitude & longitude to some JSON string but every time straight after it sets the variable it changes it back to "undefined" as soon as it passes the line after var latitude? (using firebug & firequery to debug)

    Read the article

  • Binding TabControl ItemsSource to an ObservableCollection causes content to refresh on focus

    - by Brent
    I'm creating an WPF application using the MVVM framework, and I've adopted several features from Josh Smith's article on MVVM here... Most importantly, I'm binding a TabControl to an ObservableCollection of ViewModels. This means that am using a tabbed MDI interface that displays a UserControl as the content of a TabItem. The issue I'm seeing in my application is that when I have several tabs and I flip back and forth between tabs, the content is being refersh each time I change tabs. If you download Josh Smith's source code, you'll see that his app has the same problem. For example, click on the "View All Customers" button and scroll down to the bottom the ListView. Next click on the "Create New Customer" button. When you switch back to the All Customer view you'll notice that the ListView scrolls back to the top. If you switch back to the New Customer tab and place your cursor in one of the TextBoxes, then switch to All Customers tab and back, you'll notice that the cursor is now gone. I imagine that this is because I'm using an ObservableCollection, but I can't be sure. Is there any way to prevent the tab's content from refreshing when it receives the focus?

    Read the article

  • How to set multiple cakephp projects on local computer?

    - by learner.php
    Hi, I am new to Cakephp, and very excited to learn it. I read the docs, downloaded the files, place it on my www root folder. (I am using WAMP). My question is, can I download 1 cakephp and do for multiple projects, for example I put my cakephp at %webroot%, so my to call my projects: [http://localhost/cake/project1] [http://localhost/cake/project2] and so on...

    Read the article

  • Logs are filling up with httpclient.wire.content dumps. How can I turn it off?

    - by ?????
    My catalina logs are filling up with gobs of statements like: /logs/catalina.out:2010-05-05 02:57:19,611 [Thread-19] DEBUG httpclient.wire.content - >> "[0x4] [0xc][0xd9][0xf4][0xa2]MA[0xed][0xc2][0x93][0x1b][0x15][0xfe],[0xe]h[0xb0][0x1f][0xff][0xd6][0xfb] [0x8f]O[0xd4][0xc4]0[0xab][0x80][0xe8][0xe4][0xf2][\r]I&[0xaa][0xd2]BQ[0xdb](zq[0xcd]ac[0xa8] on and on forever. I searched every config file in both tomcat and apache for the statements that purportedly turn this on as described here: http://hc.apache.org/httpclient-3.x/logging.html And I don't see where this logging as been enabled. No other .war I deployed does this. The log4j configuration block in the app isn't doing it. Any ideas? I'm using an S3 library for grails that may be the source for these. However when I run this application on my development machine (in both develop and deploy configs), I'm not seeing it.

    Read the article

  • Question about domain models & their visibility...

    - by Another SO User
    I was involved in an interesting debate about the visibility of domain models & was wondering if people here have any good guidance. Per my understanding of MDA, we need not expose the domain model throughout the application layers & tiers The reason being that any change to the domain model has an impact in the overall application The wise thing to do would be to expose light-weight object (DTO's) which are a small sub-set of the domain model to abstract the actual model On the flip side, any change to the domain model would mean changing various DTO's throughout the application for the change to be visible, while if we do expose the domain model, then the change is in a single location Hope to see some comments & thoughts about this. Appreciate all the help!

    Read the article

  • Snap to Grid UI in Cappuccino

    - by Grnbeagle
    Does anyone know how to do snap-to-grid in Cappuccino? Basically, I have draggable objects which I can drag into a target area. The target view needs to be set up with snap-to-grid feature. I've seen it with Mockingbird, so it's definitely possible. Any info is appreciated. Thanks!

    Read the article

  • How to upload binary (audio) data from a Flash AS3 client to .NET server (WCF/REST/HTTP/?)?

    - by Bobby
    Simply stated: I'm trying to record audio in a browser, and get that data back up to the server. I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex). I think I've figured out how to capture and encode the audio... But now what was easy in Silverlight, is the challenge in Flash. My server-side is .NET: MVC2- I'm open to receiving the audio in whatever manner is best- REST, WCF.. So that's my question: How could one upload binary data from Flash, to a .NET server-side endpoint. If the answer is WCF: then how would one setup the client-side proxies to communicate with the service? If the answer is REST or HTTP Post, then how would one construct this HTTP request and pass along the data? I've been reading up on AS3, but am new to Flash dev... Thanks for any help!

    Read the article

  • Confused about the Windows 7 Preinstallation Kit

    - by David Brown
    I build custom PCs and would like to use the Windows 7 Preinstallation Kit to make installation go a little quicker and customize the Windows image. However, since each PC is built to a particular customer's specifications, the hardware will rarely be the same. So, I would like to have a single answer file that will work for everything. I'm not sure if that's possible, however. What I mostly want to do for now is add my support information as well as pre-set anything that I would normally change after each installation completes. I have a Windows 7 Professional Upgrade DVD set (both 32-bit and 64-bit), but no OEM disks. I copied the Install.wim file to my local drive and opened it in the Windows System Image Manager, but it asks me to choose a catalog file specifically for each edition of Windows 7. Will this limit the answer file to whichever edition I choose? I would think choosing Starter would give me the most basic settings, which would apply to all other editions, but I'm not entirely sure of this. I don't intend to install any extra applications or drivers. I merely want to insert an OEM disk, my OPK USB drive, and have it work for whatever edition of Windows 7 I'm installing. If a large number of similarly-configured PCs need to be built, I'll go ahead and create a custom answer file in that case, but for a single machine order, that seems like overkill. In addition, do I need a separate answer file for 32-bit and 64-bit versions of Windows 7? Or will it work for both, even though I copied the Install.wim file from the 32-bit disk? Thanks!

    Read the article

  • Creating a Silverlight DataTemplate in code

    - by Nick R
    How do I create a silverlight data template in code? I've seen plenty of examples for WPF, but nothing for Silverlight. Edit: Here's the code I'm now using this for, based on the answer from Santiago below. public DataTemplate Create(Type type) { return (DataTemplate)XamlReader.Load( @"<DataTemplate xmlns=""http://schemas.microsoft.com/client/2007""> <" + type.Name + @" Text=""{Binding " + ShowColumn + @"}""/> </DataTemplate>" ); } This works really nicely and allows me to change the binding on the fly.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >