Search Results

Search found 7127 results on 286 pages for 'calculated columns'.

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

  • Textbox height in a small browser window

    - by Fritz H
    Hi folks, I have here a peculiar problem. We have a RAP application intended for use on a PDA/phone, but when it is displayed in a small browser window, all the textboxes on the form(s) are too tall (around twice the height they should be). I've stepped through the code (The form is using GridLayout, number of columns=1, make columns equal=false) and have found that the TextSizeDetermination.getCharHeight() method returns an incorrect font size if the browser window is too small - 13px if the window is large, 26px (exactly double) if the window is too small. Interestingly enough, it seems that if the window is too small, probeStore.containsProbeResult(font) in that method returns true and uses probeStore.getProbeResult(...).getSize().y for the font size. Otherwise, if the window is larger, it returns false and uses TextSizeEstimation.getCharHeight(...). Does anyone have a pointer or two for getting around this? Dialog with a properly-sized window: Dialog with a small window:

    Read the article

  • Multiple join query in eSql

    - by Syma
    Hi guys, This is my first question in stackoverflow but really not the first time to get solution here. I am struggling with multiple join in entity framework 4. I have three tables (Accounts, Users and AccountUsers) that am finding difficult to query. What I want is to get all the users for the provided accountId including the account creator. I can get all the account users with no problem but the hard side for me is getting the account creator since it's not added to AccountUsers table. below is a quick preview how the tables are related. Accounts AccountId UserId (account creator) ...other columns Users UserId ...other columns AccountUsers AccountId UserId I would prefer the query to be esql, but Linq to Entities will do. I trust you guys on stackoverflow, so I know this won't take long to get the 'Answer' mark. Thanks for even reading.

    Read the article

  • Automatic Schema Validation using NHibernate/ActiveRecord

    - by Krembo
    Hi, let's assume I have a table of Products with columns: Id, Name, Price and using NHibernate (or ActiveRecord) I map the table to the POCO: public class Product { public virtual long Id { get; set; } public virtual string Name { get; set; } public virtual double Price { get; set; } } Now if someday a new column named ShipmentPrice (let's assume it's double too) will be added to the Products table, is there any way I can automatically know that. For saying automatically I mean adding code to do that or getting an exception? (I assume I don't have control on the columns of the table or a way to know of any changes to the table's schema in advance)

    Read the article

  • What should I do with syncobj in SQL Server

    - by hgulyan
    Hi. I run this script to search particular text in sys.columns and I get a lot of "dbo.syncobj_0x3934443438443332" this kind of result. SELECT c.name, s.name + '.' + o.name FROM sys.columns c INNER JOIN sys.objects o ON c.object_id=o.object_id INNER JOIN sys.schemas s ON o.schema_id=s.schema_id WHERE c.name LIKE '%text%' If I get it right, they are replication objects. Is it so? Can i just throw them away from my query just like o.name NOT LIKE '%syncobj%' or there's another way? Thank you.

    Read the article

  • removing diffgram from .net web service returning dataset

    - by FrenchiInLa
    per my client request I have been requested to return a dataset. basically it's an arraylist that i convert to dataset as follow DataSet ds = new DataSet(); DataTable tbl = new DataTable("Table"); DataRow drow; tbl.Columns.Add("ID", Type.GetType("System.String")); tbl.Columns.Add("Name", Type.GetType("System.String")); foreach (NameIDPair item in AL) { drow = tbl.NewRow(); drow["ID"] = item.ID; drow["Name"] = item.Name; tbl.Rows.Add(drow); } ds.Tables.Add(tbl); the problem with my client is this web service add a diffgram like diffgr:hasChanges="iserted" tag to each row, and they're pretending is not consistent with other web services used by them. How can I remove this tag in the XML returned? Any help would be greatly appreciated. Thanks

    Read the article

  • jQuery Connected Sortable Lists, Save Order to MySQL

    - by user300999
    Hello Hoping that using something like this demo it is possible to drag items within and between two columns, and update their order either live or with a "save" button to MySQL. Point being that you can make changes and return to the page later to view or update your ordering. http://pilotmade.com/draggable2.html Doing it for just one column is fine, but when I try to pass the order of both columns, the issue seems to be passing multiple serialized arrays with jQuery to a PHP/MySQL update script. Any insight would be much appreciated.

    Read the article

  • C# ProgressBar design pattern

    - by MadSeb
    Hi, I'm working on a database upgrader application. The upgrader updates the schema of a database ( adds new columns, renames columns , adds new tables, new views to an existing database by executing SQL statements ). When a user wants to upgrade from version 1.0 to 2.0 , "Upgrader" objects are taken from an object factory and the "Execute" method of each "Upgrader" is called. The GUI of the application has a progress bar and each time an upgrader object performs a SQL statement the progress bar gets incremented. while (!version.Equal(CurrentVersion)) { IUpgrader myUpgrader = UpgraderFactory.GetUpgrader(version); myUpgrader.Execute(UpgradedFile,progressbar); version.Increment(); } My question is very simple : how should the upgrader object communicate with the progressbar. In the code above, the upgrader object is given direct access to the progressbar but I'm wondering if some better way of doing this or better design pattern exists. Regards, Seb

    Read the article

  • Dock Panel component for .NET that allows docking inside tab-pages?

    - by Lasse V. Karlsen
    I want to build a user-interface that, for historical reasons, has a lot of "columns" of information. Many of these aren't relevant for all users in all cases, so I thought I'd look at dock panels to allow the users to hide or rearrange the columns according to their job scenario. This is Winforms in .NET 3.5. As such, I'd like the following: Have tab-pages in the main form Each tab-page can have dock-panels docked into them Dock-panels should be movable from one tab-page to another I've tried the following component packages so far without luck: Telerik Allows me to dock inside a tab-page, but dock-panels can't move from one tab-page to another. When attempting to drop a floating panel onto a different tab-page than the one it came from, it appears the dock will succeed, but when dropped it is docked on its owner container. Divelements SandDoc Same problems as with Telerik. DevExpress XtraBars Same problems as with Telerik. Basically, does anyone know of any such component (package) that would allow me to do what I want?

    Read the article

  • Is there a way to handle the dynamic change of a dropdown for a single row in a grid-based datawindo

    - by TomatoSandwich
    Is there a way to handle the dynamic change of a dropdown for a single row in a grid-based datawindow? Example: NAME LIKABILITY PURCHASED IN COLOUR (Text) (DropDown*) (Text) (Text) Bananas [Good] Hands Yellow [Bad] [Bananas are good] Apples [Good] Bags Red [Bad] Given the above is a grid-based datawindow, where the fields 'NAME','PURCHASED IN' and 'COLOUR' are text fields, where as the 'LIKABILITY' field is a dropdown*. I say dropdown* because the same visual representation can be created by using a DropDownList (hardcoded within the datawindow element at design time), or a DropDownDW (or DDDW, a select statement that can be based on other elements in the datawindow). However, there is no way I can get 'Bananas' having it's 3 dropdowns, while Apples has only 2. If I enter multiple rows of 'Bananas', then all rows have 3 dropdowns, but as soon as I add an Apples row, all dropdowns revert to 2 selections. To attempt to achieve this functionality, I have tried the following options: -- 1) dw_1.Object.likability.values("Good~tG/Bad~tB/Bananas are good~tDRWHO") on ue_itemchange when editing NAME. FAILS: edits all instances of LIKABILITY instead of the current row. -- 2) Duplicate Dropdowns, having one filtered, one unfiltered selection list per row, visible based on NAME selection. FAILS: can't set visibility/overlapping columns on grid-based datawindow. (Source) -- 3) Hard-code display value as Database value, or Vice Versa. Have 'GOOD','BAD','BANANASAREGOOD' as the display and database values, and change handling of options from G, B, DRWHO to these new values. FAILS: 3rd option appears for all rows, still selectable on Apple rows, which is wrong. -- 4) DDDW retrieve list of options for dropdown. Create a DDDW that uses the value of NAME to determine what selections it should have for the dropdown. FAILS: edits all instances of the dropdown, not just the current row. -- 5) DDDW retrieve counter of options available (if B then 3 else 2), then have duplicate dropdown columns that protect/unprotect based on DDDW counter. FAILS: Can't autoselect dddw value to populate column to cause protect on other two columns, ugly solution in any case. -- There is now a bounty on this question for anyone who can give me a solution that will enable me to edit a dropdown column for a single row on a grid-based datawindow in PB 10.5

    Read the article

  • Tables with no Primary Key

    - by Matt Hamilton
    I have several tables whose only unique data is a uniqueidentifier (a Guid) column. Because guids are non-sequential (and they're client-side generated so I can't use newsequentialid()), I have made a non-primary, non-clustered index on this ID field rather than giving the tables a clustered primary key. I'm wondering what the performance implications are for this approach. I've seen some people suggest that tables should have an auto-incrementing ("identity") int as a clustered primary key even if it doesn't have any meaning, as it means that the database engine itself can use that value to quickly look up a row instead of having to use a bookmark. My database is merge-replicated across a bunch of servers, so I've shied away from identity int columns as they're a bit hairy to get right in replication. What are your thoughts? Should tables have primary keys? Or is it ok to not have any clustered indexes if there are no sensible columns to index that way?

    Read the article

  • sql server : get default value of a column

    - by luke
    Hello, I execute a select to get the structure of a table. I want to get info about the columns like its name or if it's null or if it's primary key.. I do something like this ....sys.columns c... c.precision, c.scale, c.is_nullable as isnullable, c.default_object_id as columndefault, c.is_computed as iscomputed, but for default value i get the id..something like 454545454 but i want to get the value "xxxx". What is the table to search or what is the function to convert that id to the value. Thanks

    Read the article

  • Problem with between join for sqlalchemy orm relation.

    - by Gary van der Merwe
    I'm trying to create a relation that has a between join. Here is a shortish example of what I'm trying to do: #!/usr/bin/env python import sqlalchemy as sa from sqlalchemy import orm from sqlalchemy.engine.base import Engine from sqlalchemy.ext.declarative import declarative_base metadata = sa.MetaData() Base = declarative_base(metadata=metadata) engine = sa.create_engine('sqlite:///:memory:') class Network(Base): __tablename__ = "network" id = sa.Column(sa.Integer, primary_key=True) ip_net_addr_db = sa.Column('ip_net_addr', sa.Integer, index=True) ip_broadcast_addr_db = sa.Column('ip_broadcast_addr', sa.Integer, index=True) # This can be determined from the net address and the net mask, but we store # it in the db so that we can join with the address table. ip_net_mask_len = sa.Column(sa.SmallInteger) class Address(Base): __tablename__ = "address" ip_addr_db = sa.Column('ip_addr', sa.Integer, primary_key=True, index=True, unique=True) Network.addresses = orm.relation(Address, primaryjoin=Address.ip_addr_db.between( Network.ip_net_addr_db, Network.ip_broadcast_addr_db), foreign_keys=[Address.ip_addr_db]) metadata.create_all(engine) Session = orm.sessionmaker(bind=engine) Network() I you run this, you get this error: ArgumentError: Could not determine relation direction for primaryjoin condition 'address.ip_addr BETWEEN network.ip_net_addr AND network.ip_broadcast_addr', on relation Network.addresses. Do the columns in 'foreign_keys' represent only the 'foreign' columns in this join condition ? The answer to that question is Yes, but I cant figure out how to tell it that

    Read the article

  • Mysql JOIN problem

    - by FinalDestiny
    I have 2 mysql tables : Question with the following columns : id, question, nranswers Nranswers must be a number from 1 to 5 And the other table is Answers with the following columns: userid, answer . Now the problem is that I want to get the replies for each answer for one question(id 22 let's say) . P.S. If the nranswers is 3, the result should look like this: (the right number means how many times the reply number was chosen) 1 - 2 2 - 8 3 - 7 If the nranswers is 5, the result should look like this: 1 - 3 2 - 8 3 - 14 4 - 19 5 - 8 Please help me out with the query, atm he's not counting the answers that weren't chosen, only the ones that were chosen at least one time.

    Read the article

  • nHibernate multiple classes pointing to same table?

    - by Amitabh
    Is it a good idea to create a lighter version of an Entity in some cases just for performance reason pointing to same table but with fewer columns mapped. E.g If I have a Contact Table which has 50 Columns and in few of the related entities I might be interested in FirstName and LastName property is it a good idea to create a lightweight version of Contact table. E.g. public class LightContact { public int Id {get; set;} public string FirstName {get; set;} public string LastName {get; set;} } Also is it possible to map multiple classes to same table?

    Read the article

  • Trying to verify understanding of foreign keys SQL Server

    - by msarchet
    So I'm working on just a learning project to expose myself to doing some things I do not get to do at work. I'm just making a simple bug and case tracking app (I know there are a million this is just to work with some tools I don't get to). So I was designing my database and realized I've never actually used Foreign Keys before in any of my projects, I've used them before but never actually setting up a column as a FK. So I've designed my database as follows, which I think is close to correct (at least for the initial layout). However When I try to add the FK's to the linking Tables I get an error saying, "The tables present in the relationship must have the same number of columns". I'm doing this by in SQLSMS by going to the Keys 'folder' and adding a FK. Is there something that I am doing wrong here, I don't understand why the tables would have to have the same number of columns for me to add a FK relationship between the tables?

    Read the article

  • Understanding the output from svn export

    - by ThatBlairGuy
    Working on some tweaks for a build script, I noticed that the output from svn export has an 'A' in column 1 for each file exported. A C:\build\file1 A C:\build\file2 A C:\build\file3 The subversion book describes the meaning of the various columns for svnlook changes and svn status, but I'm not having much luck finding the meaning behind this one. What does the 'A' in column 1 mean? Are there any other values displayed there? Any other columns? Thanks!

    Read the article

  • Call function from GridView source html

    - by Steven
    Here's my GridView HTML: <asp:GridView ID="gvPortfolioImages" runat="server" AutoGenerateColumns="False" DataSourceID="ldsPortfolioImages"> <Columns> <asp:TemplateField HeaderText="Image" SortExpression="Filename"> <ItemTemplate> <img src='<%# Portfolio.GetImageURL(Eval("Thumbnail").ToString()) %>' alt='<%# Eval("Thumbnail") %>' /> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> I'm get the following error where I'm trying to call Portfolio.GetImageURL(): The name 'Portfolio' does not exist in the current context I've seen functions called like this before, but it doesn't seem to be working for me. Can anyone tell me what the problem is?

    Read the article

  • How do I display a DataGridView within a cell of another datagridview in C# forms app?

    - by Sachin
    How do I display a DataGridView within a cell of another datagridview in C# forms app? How would I have to handle Sorting & value changed if this possible? That is the only way I can display data to make some sense.. Think of it like I have a task column and dates column. Under the dates column I have a list of things to be done. These date columns are dynamic & there might be multiple date columns Thanks, Sachin

    Read the article

  • MySQL query, SUM of multiple colums

    - by Mick
    Hi I have multiple columns in a mySQL table. Three of the columns are named i100s, i60s and i25s and what I want to do is get the sum of all three entries . currently I have this code '$query= "SELECT SUM(i100s),SUM(i60s),SUM(i25s) AS tkit FROM event WHERE acc='100' " ; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result) ; $total = $row['tkit'];' But it is not returning the correct result , can anyone help me please ? Thanks Mick

    Read the article

  • How to specify an association relation using declarative base

    - by sam
    I have been trying to create an association relation between two tables, intake and module . Each intake has a one-to-many relationship with the modules. However there is a coursework assigned to each module, and each coursework has a duedate which is unique to each intake. I tried this but it didnt work: intake_modules_table = Table('tg_intakemodules',metadata, Column('intake_id',Integer,ForeignKey('tg_intake.intake_id', onupdate="CASCADE",ondelete="CASCADE")), Column('module_id',Integer,ForeignKey('tg_module.module_id', onupdate ="CASCADE",ondelete="CASCADE")), Column('dueddate', Unicode(16)) ) class Intake(DeclarativeBase): __tablename__ = 'tg_intake' #{ Columns intake_id = Column(Integer, autoincrement=True, primary_key=True) code = Column(Unicode(16)) commencement = Column(DateTime) completion = Column(DateTime) #{ Special methods def __repr__(self): return '"%s"' %self.code def __unicode__(self): return self.code #} class Module(DeclarativeBase): __tablename__ ='tg_module' #{ Columns module_id = Column(Integer, autoincrement=True, primary_key=True) code = Column(Unicode(16)) title = Column(Unicode(30)) #{ relations intakes = relation('Intake', secondary=intake_modules_table, backref='modules') #{ Special methods def __repr__(self): return '"%s"'%self.title def __unicode__(self): return '"%s"'%self.title #} When I do this the column duedate specified in the intake_module_table is not created. Please some help will be appreciated here. thanks in advance

    Read the article

  • Remove Duplicates from List of HashMap Entries

    - by HonorGod
    I have a List<HashMap<String,Object>> which represents a database where each list record is a database row. I have 10 columns in my database. There are several rows where the values of 2 particular columns are equals. I need to remove the duplicates from the list after the list is updated with all the rows from database. What is the efficient way? FYI - I am not able to do distinct while querying the database, because the GroupName is added at a later stage to the Map after the database is loaded. And since Id column is not primary key, once you add GroupName to the Map. You will have duplicates based on Id + GroupName combination! Hope my question makes sense. Let me know if we need more clarification.

    Read the article

  • Using one sqlconnection/sqlcommand through 2 DB-bound methods

    - by dotnetdev
    I have a class with a method which gets data from a database through a SELECT stored proc. This method uses a SqlDbReader by returning ExecuteReader() on a SqlCommand. The connection and everything is made in this method, with fields (such as connection string) set as class level fields. I now need to populate an array based on the results of this query (so the columns of each row will go into the array with its own index). However, this query will not select all of the data from one table which is involved. I can write the queries to get what I need, but how can I use one connection throughout the class? If I instantiate the connection object and call Open() in the constructor, I get an exception @ runtime. I'm hoping for something like this: // At class level: sqlconn.Open(); // sqlcommand set up Method() { // Fire stored proc // Insert results in a collection } Method2() { // Pass same collection in (use same one), // Add new row columns into same collection } How can I do this with strict performance in mind? Thanks

    Read the article

  • Flex datagrid multiple rows single file

    - by Vish
    Hi, I have a flex datagrid with 3 columns. The first column contains the image name(unique key). The other two columns have username and size details. I want to split the username into lastname, firstname, address and some other stuff. Can we have multiple rows in the grid for one image? Tried multi-line, it works but we need to keep adding spaces and its cumbersome. Since each row in the flex datagrid is represented by one index in the XMLList which is enumerated, is there a way to have more than one row assigned to one image and shown in the grid? something like this.. Thanks, Vish.

    Read the article

  • NHibernate Unique Constraint on Name and Parent Object fails because NH inserts Null

    - by James
    Hi, I have an object as follows Public Class Bin Public Property Id As Integer Public Property Name As String Public Property Store As Store End Class Public Class Store Public Property Id As Integer Public Property Bins As IEnumerable(Of Bin) End Class I have a unique constraint in the database on Bin.Name and BinStoreID to ensure unique names within stores. However, when NHibernate persists the store, it first inserts the Bin records with a null StoreID before performing an update later to set the correct StoreID. This violates the Unique Key If I persist two stores with a Bin of the same name because The Name columns are the same and the StoreID is null for both. Is there something I can add to the mapping to ensure that the correct StoreID is included in the INSERT rather than performing an update later? We are using HiLo identity generation so we are not relying on DB generated identity columns Thanks James

    Read the article

  • Enforcing a query in MySql to use a specific index

    - by Hossein
    Hi, I have large table. consisting of only 3 columns (id(INT),bookmarkID(INT),tagID(INT)).I have two BTREE indexes one for each bookmarkID and tagID columns.This table has about 21 Million records. I am trying to run this query: SELECT bookmarkID,COUNT(bookmarkID) AS count FROM bookmark_tag_map GROUP BY tagID,bookmarkID HAVING tagID IN (-----"tagIDList"-----) AND count >= N which takes ages to return the results.I read somewhere that if make an index in which it has tagID,bookmarkID together, i will get a much faster result. I created the index after some time. Tried the query again, but it seems that this query is not using the new index that I have made.I ran EXPLAIN and saw that it is actually true. My question now is that how I can enforce a query to use a specific index? also comments on other ways to make the query faster are welcome. Thanks

    Read the article

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