Search Results

Search found 12392 results on 496 pages for 'backing field'.

Page 43/496 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • Insert hex string value to sql server image field is appending extra 0

    - by rotary_engine
    Have an image field and want to insert into this from a hex string: insert into imageTable(imageField) values(convert(image, 0x3C3F78...)) however when I run select the value is return with an extra 0 as 0x03C3F78... This extra 0 is causing a problem in another application, I dont want it. How to stop the extra 0 being added? The schema is: CREATE TABLE [dbo].[templates]( [templateId] [int] IDENTITY(1,1) NOT NULL, [templateName] [nvarchar](50) NOT NULL, [templateBody] [image] NOT NULL, [templateType] [int] NULL) and the query is: insert into templates(templateName, templateBody, templateType) values('I love stackoverflow', convert(image, 0x3C3F786D6C2076657273696F6E3D.......), 2) the actual hex string is quite large to post here.

    Read the article

  • DynamicJasper(on Grails) Purposefully keep column or field blank(empty)

    - by petejoe
    Hi, I want to generate a pdf report, where a column(or cell/field) is left blank(empty) on purpose. This column actually does have a value but, I'm choosing not to display it. The column title still needs to be displayed. Example of where this could be useful: Blank(empty) column: A comments or notes column down one side of a report. Blank(empty) cell: A sudoku puzzle print-out. Much appreciated. DynamicJasper is Awesome! Thanks to the dj-team. Regards, Pete

    Read the article

  • Which field is explain telling me to index?

    - by shady
    I don't understand what this explain statement is saying. Which field needs an index?. The first line to me is confusing because ref is null. Here's the query I'm using: SELECT pp.property_id AS 'good_prop_id', pr.site_number AS 'pr.site_number', CONCAT(pr.site_street_name, ' ', pr.site_street_type) AS 'pr.partial_addr', pr.county FROM realval_newdb.preforeclosures AS pr INNER JOIN realval_newdb.properties_preforeclosures AS pp USE INDEX (mee_id) ON (pr.mee_id = pp.mee_id) INNER JOIN listings_copy AS lc ON (pr.site_number = lc.site_number) AND (lc.site_street_name = CONCAT(pr.site_street_name, ' ', pr.site_street_type)) WHERE lc.site_county = pr.county LIMIT 1; Can anyone help me optimize this query?

    Read the article

  • How to declare a warning on field with AspectJ

    - by Ralph
    I want to declare a warning on all fields Annotated with @org.jboss.weld.context.ejb.Ejb in AspectJ. But I do not find a way how to select that field. I guess the aspect should be something like that: public aspect WrongEjbAnnotationWarningAspect { declare warning : within(com.queomedia..*) && ??? (@org.jboss.weld.context.ejb.Ejb) : "WrongEjbAnnotationErrorAspect: use javax.ejb.EJB instead of weld Ejb!"; } Or is it impossible to declare warnings on fields at all?

    Read the article

  • jquery disable rule validation on a single field

    - by shake
    I am using mvc to create forms that are generated at runtime. For validation, I am trying my hand at the jquery validation library which is very convenient to use. I have the validation expression of each field in the cdata attribute of the tag <input type="text" name="xyz" id="xyz" class="defaultTextBox" cdata="{validate:{required:true, decimal:true, messages: {required:'Please enter an decimal value', decimal:'Please enter a valid decimal'}}}"> This works beautifully. Now one more requirement I have is that some fields are being shown and hidden according to the logic on the page and I need to disable the validation on the hidden fields such that they do not interfere with the form submission. Just toggling the required:true to false and back to true should be enough. Only i do not know how. Anyone has any experience with that?

    Read the article

  • Query filter design for string field

    - by Midhat
    A field in my table can have arbitrary strings. On the UI, there is a drop down having options like All, Value1, Value2 And the results were filtered by the selected option value. So far this is easy and adding new filters to the UI is not a problem. Needs no changes in my stored procedure. Now I want to have an "Others" option here as well, which will return rows not having the column value as Value1 or Value2. Apparently this will require a "not in" operator in my query, and will make maintenance difficult, as the list of values is likely to change Any suggestions, design tips?

    Read the article

  • How to handle Foreign key for optional field in .NET

    - by brz dot net
    What is the best way to handle following situation? A dropdown(for master table) is optional in a particular form. But, In database table the field is constrained with foreign key. If user don't select from dropdown then It creates problem because of foreign key. One solution is to create default option in master table and use it in case of blank selection. but in dropdown, we need to handle this to show on top. Is it perfect solution? Is there any other optimized solution for this? Thanks

    Read the article

  • Creating Ada record with one field

    - by ada hater
    I've define a type: type Foo is record bar : Positive; end record; I want to create a function that returns an instance of the record: function get_foo return Foo is return (1); end get_foo; But Ada won't let me, saying "positional aggregate cannot have one argument". Stupidly trying, I've added another dumb field to the record, and then return (1, DOESNT_MATTER); works! How do I tell Ada that's not a positional aggregate, but an attempt to create a record?

    Read the article

  • Gson serialization depending on field value

    - by Serj Lotutovici
    I have a POJO that is similar to: public class MyGsonPojo { @Expose @SerializedName("value1") private String valueOne; @Expose @SerializedName("value2") private boolean valueTwo; @Expose @SerializedName("value3") private int valueThree; // Getters and other stuff here } The issue is that this object has to be serialized into a json body for a call to the server. Some fields are optional for the request and if I even send it with default and null values, the API responds differently (Unfortunately changing the api is not an option). So basically I need to exclude fields from serialization if any of them is set to a default value. For example if the field valueOne is null the resulting json should be: { "value2" : true, "value3" : 2 } Any idea how to make this a painless effort? I wouldn't want to build the json body manually. Any help would be great. Thank you in advice.

    Read the article

  • Barcode field length

    - by bestattendance
    I'm writing some attendance software. Each member will have an ID card with a barcode which they will use to sign in to events. How long should the barcode field be in my database? I'd like to accept Code 39 and Code 128 barcodes. I know these are variable length codes, so what should I set the max length to? Thanks! EDIT: My clients will be using a variety of third-party barcode printing tools.

    Read the article

  • Django ORM dealing with MySQL BIT(1) field

    - by Carles Barrobés
    In a Django application, I'm trying to access an existing MySQL database created with Hibernate (a Java ORM). I reverse engineered the model using: $ manage.py inspectdb > models.py This created a nice models file from the Database and many things were quite fine. But I can't find how to properly access boolean fields, which were mapped by Hibernate as columns of type BIT(1). The inspectdb script by default creates these fields in the model as TextField and adds a comment saying that it couldn't reliably obtain the field type. I changed these to BooleanField but it doesn't work (the model objects always fetch a value of true for these fields). Using IntegerField won't work as well (e.g. in the admin these fields show strange non-ascii characters). Any hints of doing this without changing the database? (I need the existing Hibernate mappings and Java application to still work with the database).

    Read the article

  • How to do @OneToMany mapping on the field using @transient

    - by hemal
    I am using JPA annotations here , I want to do @OneToMany mapping on filed declared as @Transient. is it possible to do mapping on @transient field ? SimpleTagGroup.java @Entity @Table(name = "TagGroup") public class SimpleTagGroup { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id = -1; @NotNull private String tagGroupName; @OneToMany(fetch = FetchType.EAGER) @JoinTable(name = "TagMapping", joinColumns = @JoinColumn(name = "id"), inverseJoinColumns = @JoinColumn(name = "tagId")) @Transient private List<SimpleTag> tags; SimpleTag.java @Entity @Table(name = "Tag") public class SimpleTag implements Tag{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id = -1; @NotNull private String tagValue;

    Read the article

  • Bind Child table data on View field- MVC ASP.Net

    - by Tassadaque
    I have two tables Contact and Addresses. Addresses is the child table of Contact. When i create view for Contact. i also want to get addresses for user as many as user wants. For contact table i bind the textbox and add validation like this <%= Html.TextBoxFor(model => model.ContactName) %> <%= Html.ValidationMessageFor(model => model.ContactName) %> Now my question is that how can i bind address field on create view screen. Regards Tassadaque

    Read the article

  • displaying datepicker on the tap of a particular text field only

    - by praseed
    hi, i have a number of textfields . i want to display datepicker on the tap of a particular textfield only. wat i have is a number of textfields for entering details of a person like Name, address, date of birth etc... On the tap of text field for entering the date of birth i want to display date picker. if i include the code for the date picker in the textFieldShouldBeginEditing method ,will that show datepicker for tap on every textfield, . Pls help me out to find a solution for this ,, I am new to iphone app development...

    Read the article

  • django updating m2m field

    - by Marconi
    I have a model service and a ModelForm named Service which I use to add and update the service model. The model looks like this: class Service(models.Model): categories = models.ManyToManyField(Category) The categories field is displayed as a tag with that allows multiple selection. It works well when I'm adding a new record but when I'm updating it, only one service is showing up on the request.POST['categories'] even if I selected multiple categories. I tried dumping the request object and I can see that the categories is showing something like: u'categories': [u'3', u'4', u'2'] I tried calling the request._get_post() and it did return only 1 category, hence the request.POST['categories'] returns only 1. Anybody who knows what's happening and how to fix it?

    Read the article

  • AutoComplete field and IE

    - by user102533
    My web page does not have the autocomplete attribute that would tell browsers not to autocomplete the field. In spite of not having this attribute, IE 8 or Safari (not sure on other browsers) does not autocomplete the page. Autocomplete does work on some sites (such as Gmail) so I am assuming that the browser setting is not causing it? Here's the code: <tr> <td>User Id</td> <td><input name="userId" type="text" id="userId" runat="server" /></td> </tr> <tr> <td>Password</td> <td><input name="password" type="password" id="password" enableviewstate="false" runat="server" /></td> </tr>

    Read the article

  • How do I use grep to extract a specific field value from lines

    - by Stormshadow
    I have lines in a file which look like the following ....... DisplayName="john" .......... where .... represents variable number of other fields. Using the following grep command, I am able to extract all the lines which have a valid 'DisplayName' field grep DisplayName="[0-9A-Za-z[:space:]]*" e:\test However, I wish to extract just the name (ie "john") from each line instead of the whole line which is returned by grep. I tried pipelining the output to the cut command but it does not accept string delimiters.

    Read the article

  • an error "variable of field declared void"

    - by lego69
    I have this code: header - test.h Inside header I have some class Z and definitions of two functions test and test2 I call function test2 from test void test2(Z z, Z const *za); this is implementation of the function: void test2(Z z, Z const *za){ int i = z; //this row works cout << i << endl; } I call it from test: test2(z1, za1); // za1 is pinter to object and z1 is some object but in my header I receive an 3 errors: Multiple markers at this line - initializer expression list treated as compound expression - `A' was not declared in this scope - variable or field `quiz2' declared void can somebody please explain why? thanks in advance

    Read the article

  • MySQL Join Comma Separated Field

    - by neeraj
    I have two tables. First Table is a batch table that contain comma separated student id in field "batch" batch -------------- id batch -------------- 1 1,2 2 3,4 Second Table is marks marks ---------------------- id studentid subject marks 1 1 English 50 2 2 English 40 3 3 English 70 4 1 Math 65 5 4 English 66 6 5 English 75 7 2 Math 55 How we can find those students of first batch id =1 who have scored more than 45 marks in English without using sub query. Problem i found to get this done using a single query is that we can not use IN as an association operator in JOIN statement What changes are required in below query to make it work? SELECT * FROM batch INNER JOIN marks ON marks.studentid IN(batch.batch) where batch.id = 1

    Read the article

  • Toggled() text input field not working in IE6 in Jquery 1.3.2

    - by Michal
    In IE6 after showing() or toggling() an initially hidden text input field it is impossible to enter any text in the box. It is also impossible to focus() on the element. I am using jquery 1.3.2 Here is the code... Any ideas? $(document).ready(function(){ $(".hide").click(function(){ $(".form").toggle(); }) }) and HTML <form> <div class="hide"> Show </div> <div class="form" style="display:none"> <input type="text" name="crap"> </div> </form>

    Read the article

  • Preventing entire JOINed MYSQL query from failing when one field is missing within a WHERE clause

    - by filip o
    I am doing a couple of joins with a variable in the WHERE clause. I'm not sure if I am doing everything as efficiently as I could, or even using the best practices but my issue is that half my tables have data for when tableC.type=500, and the other half don't resulting in the entire query failing. SELECT tableA.value1 , tableB.value2, tableC.value3 FROM tableA JOIN tableB ON tableB.id=tableA.id JOIN tableC ON tableC.id=tableB.id WHERE tableA.category=$var && tableC.type=500; What I would like to happen is to still get tableA.value1 and tableB.value2 even if there is no field in tableC with a type=500. any thoughts? i'm totally stumped as how to approach this...

    Read the article

  • Match two mysql cols on alpha chars (ignoring numbers in same field)

    - by Steve
    I was wondering if you know of a way I could filter a mysql query to only show the ‘alpha’ characters from a specific field So something like SELECT col1, col2, **alpha_chars_only(col3)** FROM table I am not looking to update only select. I have been looking at some regex but without much luck most of what turned up was searching for fields that only contain ‘alpha’ chars. In a much watered down context... I have col1 which contains abc and col two contains abc123 and I want to match them on alpha chars only. There can be any number of letters or numbers. Any help very much wel come

    Read the article

  • PHP displaying error for already used Username and empty field

    - by Pixel Reaper
    I want PHP to make sure the username is not already used and also check to see if the field is empty. Sorry I am a huge noob when it comes to php. Here is my code: // Check for an Username: $dup = mysql_query("SELECT user_username FROM users WHERE user_username='".$_POST['user_username']."'"); if(mysql_num_rows($dup) >0){ $errors[] = 'Username already used.'; } else{ $un = mysqli_real_escape_string($dbc, trim($_POST['user_username'])); echo '<b>Congrats, You are now Registered.</b>'; } else { $errors[] = 'You forgot to enter your Username.'; }

    Read the article

  • What is an instance of a field called?

    - by waxwing
    This might be an odd question, but it has actually caused me some headache. In Object oriented programming, there are accepted names for key concepts. In our model, we have classes with methods and fields. Now, going to the data world: An instance of a class is called an object. An instance of a field is called... what? A value? Isn't the term value a little broad for this? I have been offered "property" as well, but isn't property also part of the model and not the data? (This is not purely academic, I am actually coding these concepts.)

    Read the article

  • Django m2m adding field in the secondary table

    - by dana
    I have a model in wich i'm using m2m Django ORM feature, in order to create an aditional table to hold my 'classrom members'. My problem is: the membership to a classroom must be accepted by the invited one, so i need a boolean field :1=accepted, 0=refused/unseen yet. How can i include this boolean variable in the aditionally generated classroom_membership (and NOT in the primary created Classroom table)? class Classroom(models.Model): user = models.ForeignKey(User, related_name = 'classroom_creator') classname = models.CharField(max_length=140, unique = True) date = models.DateTimeField(auto_now=True) open_class = models.BooleanField(default=True) #domain = models.EnumField() members = models.ManyToManyField(User,related_name="list of invited members") Thanks in advance!!

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >