Search Results

Search found 3163 results on 127 pages for 'schema'.

Page 85/127 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • Problem deserializing xml file

    - by Andy
    I auto generated an xsd file from the below xml and used xsd2code to get a c# class. The problem is the entire xml doesn't deserialize. Here is how I'm attempting to deserialize: static void Main(string[] args) { using (TextReader textReader = new StreamReader("config.xml")) { // string temp = textReader.ReadToEnd(); XmlSerializer deserializer = new XmlSerializer(typeof(project)); project p = (project)deserializer.Deserialize(textReader); } } here is the actual XML: <?xml version='1.0' encoding='UTF-8'?> <project> <scm class="hudson.scm.SubversionSCM"> <locations> <hudson.scm.SubversionSCM_-ModuleLocation> <remote>https://svn.xxx.com/test/Validation/CPS DRTest DLL/trunk</remote> </hudson.scm.SubversionSCM_-ModuleLocation> </locations> <useUpdate>false</useUpdate> <browser class="hudson.scm.browsers.FishEyeSVN"> <url>http://fisheye.xxxx.net/browse/Test/</url> <rootModule>Test</rootModule> </browser> <excludedCommitMessages></excludedCommitMessages> </scm> <openf>Hello there</openf> <buildWrappers/> </project> When I run the above, the locations node remains null. Here is the xsd that I'm using: <?xml version="1.0" encoding="utf-8"?> <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="project"> <xs:complexType> <xs:all> <xs:element name="openf" type="xs:string" minOccurs="0" /> <xs:element name="buildWrappers" type="xs:string" minOccurs="0" /> <xs:element name="scm" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="useUpdate" type="xs:string" minOccurs="0" msdata:Ordinal="1" /> <xs:element name="excludedCommitMessages" type="xs:string" minOccurs="0" msdata:Ordinal="2" /> <xs:element name="locations" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="hudson.scm.SubversionSCM_-ModuleLocation" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="remote" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="browser" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="url" type="xs:string" minOccurs="0" msdata:Ordinal="0" /> <xs:element name="rootModule" type="xs:string" minOccurs="0" msdata:Ordinal="1" /> </xs:sequence> <xs:attribute name="class" type="xs:string" /> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="class" type="xs:string" /> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element> <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element ref="project" /> </xs:choice> </xs:complexType> </xs:element> </xs:schema>

    Read the article

  • dataset not getting all the resultant tables i.e multiple tables are not being displayed in dataset

    - by Shantanu Gupta
    How to fill multiple tables in a dataset. I m using a query that returns me four tables. At the frontend I am trying to fill all the four resultant table into dataset. Here is my Query. Query is not complete. But it is just a refrence for my Ques Select * from tblxyz compute sum(col1) suppose this query returns more than one table, I want to fill all the tables into my dataset I am filling result like this con.open(); adp.fill(dset); con.close(); Now when i checks this dataset. It shows me that it has four tables but only first table data is being displayed into it. rest 3 dont even have schema also. What i need to do to get desired output

    Read the article

  • Are there any good resources for developing Entity Framework 4 code-first?

    - by KallDrexx
    I am trying to convert my model-first project to code-first, as I can see dealing with the models with the graphical designer will become hard. Unfortunately, with all my googling I can't find one good reference that describes how to do code-first development. Most resources are out of date (so out of date they refer to it as code-only), and the other references I can find seem to assume you understand the basics of context building and code-first (for example, they reference code to build contexts but don't describe where that code should actually go, and how it's actually run). Are there any decent resources for code-first development, that describe how to map your POCO entities into a database schema?

    Read the article

  • How to get hold of the current NHibernate.Cfg.Configuration instance.

    - by Sandor Drieënhuizen
    My C# project has repositories that are instantiated using dependency injection. One of the repository methods needs access to the NHibernate.Cfg.Configuration instance (to generate the database schema) that was returned when initializing NHibernate. I cannot pass the configuration to the repository however, because that would break the persistence ignorance principle -- I really don't want to expose any implementation details through the repository interface. So what I'm looking for is a way of getting hold of the current NHibernate.Cfg.Configuration instance from within my repository. I have no trouble getting hold of the current session, it's just the configuration that I cannot get hold of.

    Read the article

  • Sequel Migration not running up?

    - by Sleepycat
    Having some trouble with the Migrations in Sequel and could use another set of eyes. I am running a migration that looks ok but no table is created. It is definitely connecting because I can see the schema_info table has been created. -M 0/1 changes the version as you would expect but still no table. The command: sequel -m . -M 1 ~/Desktop/dbtest/testdb.yml 001_testdb.rb: class TestDb < Sequel::Migration def up create_table( "terminals") do primary_key :id Integer :location_id Integer :merchant_id BigDecimal :terminal_id, :size=>[11, 0] String :reference, :size=>255 DateTime :created_at DateTime :updated_at String :image, :default=>"default.jpg", :size=>255 end end def down drop_table :terminals end end The output in Postgres: test_db=# \dt List of relations Schema | Name | Type | Owner --------+-------------+-------+---------- public | schema_info | table | postgres (1 row) test_db=# select * from schema_info; version --------- 1 (1 row)

    Read the article

  • Unexpected JAXB error

    - by Mark Lewis
    Hello, From the documentation it's clear I need to use the following to get a simple unmarshalling to occur from my XML file/schema: JAXBContext jc = JAXBContext.newInstance("PackageName"); where PackageName is my package name. I've looked on google for a bit to no avail, to find out why I'm then getting this runtime error: Line:Col[2:142]:cvc-elt.1: Cannot find the declaration of element 'myconfig'. Line:Col[2:142]:unexpected element (uri:"http://www.w3.org", local:"myconfig"). Expected elements are <{}myconfig> Caught UnmarshalException This occurs at the top of all my class files, including the ones the XJC plugin for eclipse created for me (which I then moved out of PackageName.PackageName which it automatically created): package PackageName; so why is this error occurring?

    Read the article

  • Help with Linked Server Error

    - by Randy Minder
    In SSMS 2008, I am trying to execute a stored procedure in a database on another server. The call looks something like the following: EXEC [RemoteServer].Database.Schema.StoredProcedureName @param1, @param2 The linked server is set up correctly, and has both RPC and RPC OUT set to true. Security on the linked server is set to Be made using the login's current security context. When I attempt to execute the stored procedure, I get the following error: Msg 18483, Level 14, State 1, Line 1 Could not connect to server 'RemoteServer' because '' is not defined as a remote login at the server. Verify that you have specified the correct login name. I am connected to the local server using Windows Authentication. Anyone know why I would be getting this error?

    Read the article

  • Formula needed: Sort array to array-"snaked"

    - by aw
    After the you guys helped me out so gracefully last time, here is another tricky array sorter for you. I have the following array: a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] I use it for some visual stuff and render it like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Now I want to sort the array to have a "snake" later: // rearrange the array according to this schema 1 2 3 4 12 13 14 5 11 16 15 6 10 9 8 7 // the original array should look like this a = [1,2,3,4,12,13,14,5,11,16,15,6,10,9,8,7] Now I'm looking for a smart formula / smart loop to do that ticker = 0; rows = 4; // can be n cols = 4; // can be n originalArray = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]; newArray = []; while(ticker < originalArray.length) { //do the magic here ticker++; } Thanks again for the help.

    Read the article

  • Rspec-rails doesn't seem to find my models

    - by sa125
    Hi - I'm trying out rspec, and immediately hit a wall when it doesn't seem to load db records I know exist. Here's my fairly simple spec (no tests yet). require File.expand_path(File.dirname(__FILE__) + '../spec_helper') describe SomeModel do before :each do @user1 = User.find(1) @user2 = User.find(2) end it "should do something fancy" end I get an ActiveRecord::RecordNotFound exception, saying it couldn't find User w/ ID=1 or ID=2, which I know for a fact exist. I set both test and development databases to point to the same schema in database.yml, so this shouldn't be database mixup. I also ran script/generate rspec after installing the gems (rspec, rspec-rails), and gem.config both environment.rb and test.rb. Any idea what I'm missing? thanks. EDIT Seems I was running the tests with rake spec:models, which emptied the db and thus no records were found. When I used % spec spec/models/some_model_spec.rb, everything worked as expected.

    Read the article

  • A good design pattern for almost similar objects

    - by Sam
    Hello, I have two websites that have an almost identical database schema. the only difference is that some tables in one website have 1 or 2 extra fields that the other and vice versa. I wanted to the same Database Access layer classes to will manipulate both websites. What can be a good design pattern that can be used to handle that little difference. for example, I have a method createAccount(Account account) in my DAO class but the implementation will be slightly different between website A and website B. I know design patterns don't depend on the language but FYI i m working with Perl. Thanks

    Read the article

  • C# dbml stops linking tables to code

    - by Philip
    I am having occasional trouble with my C# dbml where it starts not linking properly. I do not know how to replicate the exact cause of the problem, it was working perfectly until I changed a database table and then deleted the table and readded it with the new schema. The error message I get is "The type or namespace name 'tbl' could not be found (are you missing a using directive or an assembly reference?) The only fix I have found is to make a new dbml readd the tables. Any ideas what to do or why this is happening?

    Read the article

  • How to fill dataset when sql is returning more than one table

    - by Shantanu Gupta
    How to fill multiple tables in a dataset. I m using a query that returns me four tables. At the frontend I am trying to fill all the four resultant table into dataset. Here is my Query. Query is not complete. But it is just a refrence for my Ques Select * from tblxyz compute sum(col1) suppose this query returns more than one table, I want to fill all the tables into my dataset I am filling result like this con.open(); adp.fill(dset); con.close(); Now when i checks this dataset. It shows me that it has four tables but only first table data is being displayed into it. rest 3 dont even have schema also. What i need to do to get desired output

    Read the article

  • How to execute T-SQL for several databases whose names are stored in a table

    - by emzero
    Hey guys, so here's the deal. I have several databases (SqlServer 2005) on the same server with the same schema but different data. I have one extra database which has one table storing the names of the mentioned databases. So what I need to do is to iterate over those databases name and actually "switch" to each one (use [dbname]) and execute a T-SQL script. Am I clear? Let me give you an example (simplified from the real one): CREATE TABLE DatabaseNames ( Id int, Name varchar(50) ) INSERT INTO DatabaseNames SELECT 'DatabaseA' INSERT INTO DatabaseNames SELECT 'DatabaseB' INSERT INTO DatabaseNames SELECT 'DatabaseC' Assume that DatabaseA, DatabaseB and DatabaseC are real existing databases. So let's say I need to create a new SP on those DBs. I need some script that loops over those databases and executes the T-SQL script I specify (maybe stored on a varchar variable or wherever). Any ideas? Thanks!

    Read the article

  • Difference between Document-oriented-DB and Bigtable clones

    - by chen
    We are looking for a suitable storage engine for our weblog history data. We looked at Bigtable's paper and understand it is suitable to us well. However, I also understand that Document-oriented-DB such as MongoDB seems to provide a little more powerful schema power -- i.e, it can model our data as well. I wonder how nowadays ppl choose a scalable NoSQL DB --- I read enough articles like "we looked at A, B and C, and we decided to use C". But I'd like to see some benchmark number. What I am saying is that if MongoDB and the like can provide same level of performance as Bigtable clones, why don't web companies choose it (preparing to deal with various potentially more complex data problem)? Thanks, By the way, I read an article (which convinced me at the moment) saying Cassandra does not fit the M/R operation, any comments?

    Read the article

  • Default Values in XForms Input

    - by Josh
    I have an XForm that has certain fields that may often be left blank (optional street address). Is there is technique to set a default value for that field, preferably a space (I am running into weird formatting issues with CSS). The html form way of value="" doesn't work, neither does setting a default value in the XML schema. EXAMPLE: <xforms:input ref="clientaddress/streetaddress2" model="model_inventory" > <xforms:label>Street Address (Line 2)</xforms:label> Leaving this field blank results in <streetaddress2/> in the resulting xml document I want <streetaddress> </streetaddress>

    Read the article

  • Problems with South/Django: not recognizing the Django App

    - by christmasgorilla
    I've got a Django project on my machine and when I try to use South to migrate the data schema, I get several odd errors. Example: $ python manage.py convert_to_south thisLocator /Library/Python/2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha /Users/cm/code/thisLocator/../thisLocator/batches/models.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 There is no enabled application matching 'thisLocator'. I've followed the South documentation. Settings.py has it in the installed apps, I can run import south from the manage.py shell. Everyone else on my team is calling the app thisLocator. Am I doing something really stupid?

    Read the article

  • JAXB, Netbeans and Interface Insertion Plugin

    - by segolas
    Hi, I can't get my generated classes to implements any interface. This is my xml schema file: xmlns:jxb="http://java.sun.com/xml/ns/jaxb/" xmlns:ai="http://jaxb.dev.java.net/plugin/if_insertion" jxb:extensionBindingPrefixes="ai" <xs:element name="header"> <xs:annotation> <xs:appinfo> <ai:interfaces check="1"> utility.RuleInterface </ai:interfaces> </xs:appinfo> </xs:annotation> <xs:complexType> bla bla bla </xs:complexType> I checked the "Extension" option in the JAXB options and I hav added the xjc-if-ins.jar to the "Libraries" section of my project Properties. But the generated Header class doesn't implements the utility.RuleInterface. I can figure out what am I doing wrong... Is it something missing? Any idea? regards, Segolas

    Read the article

  • database importing problem with sql server

    - by tibin mathew
    Hi, I have a database working in mu local sql server 2005 express edition. I have to import my local dtabase to a remote servr database. For that i established connection to that remote server, and i can now see that database . but when i tried to restore database fro my local machine i'm getting an error message when i tried to give backup file location. Below is the error message The EXECUTE permission was denied on the object 'xp_availablemedia', database 'mssqlsystemresource', schema 'sys'. The user does not have permission to perform this action. The statement has been terminated. (Microsoft SQL Server, Error: 229) waht is the problem, how can i solve this. Please help me

    Read the article

  • Spring security access with multiple roles

    - by Evgeny Makarov
    I want to define access for some pages for user who has one of following roles (ROLE1 or ROLE2) I'm trying to configure this in my spring security xml file as following: <security:http entry-point-ref="restAuthenticationEntryPoint" access-decision-manager-ref="accessDecisionManager" xmlns="http://www.springframework.org/schema/security" use-expressions="true"> <!-- skipped configuration --> <security:intercept-url pattern="/rest/api/myUrl*" access="hasRole('ROLE1') or hasRole('ROLE2')" /> <!-- skipped configuration --> </security:http> I've tried various ways like: access="hasRole('ROLE1, ROLE2')" access="hasRole('ROLE1', 'ROLE2')" access="hasAnyRole('[ROLE1', 'ROLE2]')" etc but nothing seems to be working. I'm keep getting exception java.lang.IllegalArgumentException: Unsupported configuration attributes: or java.lang.IllegalArgumentException: Failed to parse expression 'hasAnyRole(['ROLE1', 'ROLE2'])' how should it be configured? Thanks

    Read the article

  • Calendar Table - Week number of month

    - by Saif Khan
    I have a calendar table with data from year 2000 to 2012 (2012 wasn't intentional!). I just realize that I don't have the week number of month (e.g In January 1,2,3,4 February 1,2,3,4) How do I go about calculating the week numbers in a month to fill this table? Here is the table schema CREATE TABLE [TCalendar] ( [TimeKey] [int] NOT NULL , [FullDateAlternateKey] [datetime] NOT NULL , [HolidayKey] [tinyint] NULL , [IsWeekDay] [tinyint] NULL , [DayNumberOfWeek] [tinyint] NULL , [EnglishDayNameOfWeek] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [SpanishDayNameOfWeek] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [FrenchDayNameOfWeek] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DayNumberOfMonth] [tinyint] NULL , [DayNumberOfYear] [smallint] NULL , [WeekNumberOfYear] [tinyint] NULL , [EnglishMonthName] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [SpanishMonthName] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [FrenchMonthName] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [MonthNumberOfYear] [tinyint] NULL , [CalendarQuarter] [tinyint] NULL , [CalendarYear] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [CalendarSemester] [tinyint] NULL , [FiscalQuarter] [tinyint] NULL , [FiscalYear] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [FiscalSemester] [tinyint] NULL , [IsLastDayInMonth] [tinyint] NULL , CONSTRAINT [PK_TCalendar] PRIMARY KEY CLUSTERED ( [TimeKey] ) ON [PRIMARY] ) ON [PRIMARY] GO

    Read the article

  • Core Data store corruption

    - by sehugg
    A handful of customers for my iPhone app are experiencing Core Data store corruption (I assume so, since the error is "Failed to save to data store: Operation could not be completed. (Cocoa error 259.)") Has anyone else experienced this kind of store corruption? I am worried since I aim to soon push an update which performs a schema migration, and I am worried that this will expose even more problems. I had assumed that the Core Data/SQLlite APIs use atomic operations and are immune to corruption except if the underlying filesystem experiences corruption. Is there a way to reduce/prevent corruption, or at least a good way to reproduce (I have been unsuccessful thus far).

    Read the article

  • Changing SQL Server Database sorting

    - by plaisthos
    I have a request to change the collation of a SQL Server Database: ALTER DATABASE solarwind95 collate SQL_Latin1_General_CP1_CI_AS but I get this strange error: Meldung 5075, Ebene 16, Status 1, Zeile 1 Das 'Spalte'-Objekt 'CustomPollerAssignment.PollerID' ist von 'Datenbanksortierung' abhängig. Die Datenbanksortierung kann nicht geändert werden, wenn ein schemagebundenes Objekt von ihr abhängig ist. Entfernen Sie die Anhängigkeiten der Datenbanksortierung, und wiederholen Sie den Vorgang. Sorry for the german errror message. I do not know how to switch the language to english, but here is a translation: Translation: Message 5075, Layer 16, Status 1, Row 1 The 'column' object 'CustomPollerAssignment.PollerID' depends on 'Database sorting. The database sorting cannot be changed if a schema bound object depends on it. Remove the dependency of the database sortieren and retry. I got a ton more of the errors like that.

    Read the article

  • Using Django Admin for a custom database solution

    - by Prashanth Ellina
    A client wants to have a simple intranet application to manage his process. He runs a Quarry and wishes to track number of loads delivered per day and associated activities. Since I knew about Django's excellent Admin interface, I figured I could define the "Schema" in models.py and have Django Admin generate the forms. I did exactly that and the result is not bad at all. I've been able to customize the look and feel to suit the client's taste. Some questions: Is Django Admin the right choice for such a use-case? Will I run to problems in the future due to flexibility of the framework? Is there a better framework out there specifically designed for this use-case (general Database management for small businesses)? I prefer ones written in Python since I can hack it up to customize. Thanks!

    Read the article

  • Tutorials for C# database app

    - by ChrisC
    My question and comments here http://stackoverflow.com/questions/2471198/what-is-ado-net shows my level of knowledge about c# database apps. Can someone point me to tutorials and/or primers that can help me proceed from where I am (also stated in other question)? I've looked and all I've found are tutorials that talk about general db basics (ie, not helping with VS/C#), or talk about connecting to existing SQL db's. I need help setting one up and configuring it, as well as help on how to create and use queries to test the db schema.

    Read the article

  • Fixtures and inheritance in Symfony

    - by Tere
    Hi! I have a database schema in Symfony like this: Persona: actAs: { Timestampable: ~ } columns: primer_nombre: { type: string(255), notnull: true } segundo_nombre: { type: string(255) } apellido: { type: string(255), notnull: true } rut: { type: string(255) } email: { type: string(255) } email2: { type: string(255) } direccion: { type: string(400) } ciudad: { type: string(255) } region: { type: string(255) } pais: { type: string(255) } telefono: { type: string(255) } telefono2: { type: string(255) } fecha_nacimiento: { type: date } Alumno: inheritance: type: concrete extends: Persona columns: comentario: { type: string(255) } estado_pago: { type: string(255) } Alumno_Beca: columns: persona_id: { type: integer, primary: true } beca_id: { type: integer, primary: true } relations: Alumno: { onDelete: CASCADE, local: persona_id, foreign: id } Beca: { onDelete: CASCADE, local: beca_id, foreign: id } Beca: columns: nombre: { type: string(255) } monto: { type: double } porcentaje: { type: double } descripcion: { type: string(5000) } As you see, "alumno" has a concrete inheritance from "persona". Now I'm trying to create fixtures for this two tables, and I can't make Doctrine to load them. It gives me this error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (eat/alumno__beca, CONSTRAINT alumno__beca_persona_id_alumno_id FOREIGN KEY (persona_id) REFERENCES alumno (id) ON DELETE CASCADE) Does someone know how to write a fixture for a table inherited from another? Thanks!

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >