Search Results

Search found 6532 results on 262 pages for 'computed columns'.

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

  • SQL Exec T-SQL statement?

    - by salvationishere
    I am trying to list all of the columns from whichever Adventureworks table I choose. What T-sQL statement or stored proc can I execute to see this list of all columns? I want to use my C# web app to input one input parameter = table_name and then get a list of all the column_names as output. Right now I am trying to execute the sp_columns stored proc which works, but I can't get just the one column with select and exec combined. Does anybody know how to do this?

    Read the article

  • Use XSLT to arrange a list of items in a table

    - by Mark Sp
    I have a linear list of items which I wish to arrange in a table using XSLT. I wish to specify the number of columns as a parameter. For example, if I have a list of 12 items, I can select a 2x6, 3x4, 4x3 or 6x2 table. I cannot see a general way to do this. I have seen this article: http://www.nedcomp.nl/support/origdocs/xml4/extracted/xpath_hdi_1_4llx.aspx It tells you how to generate a table with a specific number of columns, but does not allow a general case. (Ideally there would be a loop for the xsl:value-of lines). Thanks Mark

    Read the article

  • flex actionscript Datagridcolumn array

    - by Jad
    Hi, We have an AIR app and using a datagrid. We want to store the dataGrid.columns array in mySQL DB through PHP. This is needed because the user can customise the column headers of the datagrid and his preference needs to be stored and shown to him on his next login. Using HTTPService, we tried sending the dataGrid.columns array as a string, as follows, var ht:HTTPService = new HTTPService(); ht.url = Config.getServerURL(); ht.method = URLRequestMethod.POST; ht.resultFormat = "text"; ht.request["action"] = "updateGrid"; ht.request["headercolumns"] = colsArray.toString(); The data is stord as comma separated array string in DB. When we retrieve it back, cannot seem to cast it back to the DatagridColumns and assign it. Please let me know. Regards Jada.

    Read the article

  • How to do simple math in datagridview

    - by EB
    I am new to C#. I have a datagridview with 9 columns. I am simply trying take the value in column 5 and subtract it from column 6. Then display the result in column 9. It seems simple enough.I know it's done in excel all the time. But I just cannot figure this out. Do I need to create a new class with a method called calculate columns? or does the datagridview class have something already built in that can handle this? Again, I am new to C#. Any help would be appreciated. Thank you, Oceantrain.

    Read the article

  • Trouble updating my datagrid in WPF

    - by wrigley06
    As the title indicates, I'm having trouble updating a datagrid in WPF. Basically what I'm trying to accomplish is a datagrid, that is connected to a SQL Server database, that updates automatically once a user enters information into a few textboxes and clicks a submit button. You'll notice that I have a command that joins two tables. The data from the Quote_Data table will be inserted by a different user at a later time. For now my only concern is getting the information from the textboxes and into the General_Info table, and from there into my datagrid. The code, which I'll include below compiles fine, but when I hit the submit button, nothing happens. This is the first application I've ever built working with a SQL Database so many of these concepts are new to me, which is why you'll probably look at my code and wonder what is he thinking. public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } public DataSet mds; // main data set (mds) private void Window_Loaded_1(object sender, RoutedEventArgs e) { try { string connectionString = Sqtm.Properties.Settings.Default.SqtmDbConnectionString; using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); //Merging tables General_Info and Quote_Data SqlCommand cmd = new SqlCommand("SELECT General_Info.Quote_ID, General_Info.Open_Quote, General_Info.Customer_Name," + "General_Info.OEM_Name, General_Info.Qty, General_Info.Quote_Num, General_Info.Fab_Drawing_Num, " + "General_Info.Rfq_Num, General_Info.Rev_Num, Quote_Data.MOA, Quote_Data.MOQ, " + "Quote_Data.Markup, Quote_Data.FOB, Quote_Data.Shipping_Method, Quote_Data.Freight, " + "Quote_Data.Vendor_Price, Unit_Price, Quote_Data.Difference, Quote_Data.Vendor_NRE_ET, " + "Quote_Data.NRE, Quote_Data.ET, Quote_Data.STI_NET, Quote_Data.Mfg_Time, Quote_Data.Delivery_Time, " + "Quote_Data.Mfg_Name, Quote_Data.Mfg_Location " + "FROM General_Info INNER JOIN dbo.Quote_Data ON General_Info.Quote_ID = Quote_Data.Quote_ID", connection); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); MainGrid.ItemsSource = dt.DefaultView; mds = new DataSet(); da.Fill(mds, "General_Info"); MainGrid.DataContext = mds.Tables["General_Info"]; } } catch (Exception ex) { MessageBox.Show(ex.Message); } // renaming column names from the database so they are easier to read in the datagrid MainGrid.Columns[0].Header = "#"; MainGrid.Columns[1].Header = "Date"; MainGrid.Columns[2].Header = "Customer"; MainGrid.Columns[3].Header = "OEM"; MainGrid.Columns[4].Header = "Qty"; MainGrid.Columns[5].Header = "Quote Number"; MainGrid.Columns[6].Header = "Fab Drawing Num"; MainGrid.Columns[7].Header = "RFQ Number"; MainGrid.Columns[8].Header = "Rev Number"; MainGrid.Columns[9].Header = "MOA"; MainGrid.Columns[10].Header = "MOQ"; MainGrid.Columns[11].Header = "Markup"; MainGrid.Columns[12].Header = "FOB"; MainGrid.Columns[13].Header = "Shipping"; MainGrid.Columns[14].Header = "Freight"; MainGrid.Columns[15].Header = "Vendor Price"; MainGrid.Columns[16].Header = "Unit Price"; MainGrid.Columns[17].Header = "Difference"; MainGrid.Columns[18].Header = "Vendor NRE/ET"; MainGrid.Columns[19].Header = "NRE"; MainGrid.Columns[20].Header = "ET"; MainGrid.Columns[21].Header = "STINET"; MainGrid.Columns[22].Header = "Mfg. Time"; MainGrid.Columns[23].Header = "Delivery Time"; MainGrid.Columns[24].Header = "Manufacturer"; MainGrid.Columns[25].Header = "Mfg. Location"; } private void submitQuotebtn_Click(object sender, RoutedEventArgs e) { CustomerData newQuote = new CustomerData(); int quantity; quantity = Convert.ToInt32(quantityTxt.Text); string theDate = System.DateTime.Today.Date.ToString("d"); newQuote.OpenQuote = theDate; newQuote.CustomerName = customerNameTxt.Text; newQuote.OEMName = oemNameTxt.Text; newQuote.Qty = quantity; newQuote.QuoteNumber = quoteNumberTxt.Text; newQuote.FdNumber = fabDrawingNumberTxt.Text; newQuote.RfqNumber = rfqNumberTxt.Text; newQuote.RevNumber = revNumberTxt.Text; try { string insertConString = Sqtm.Properties.Settings.Default.SqtmDbConnectionString; using (SqlConnection insertConnection = new SqlConnection(insertConString)) { insertConnection.Open(); SqlDataAdapter adapter = new SqlDataAdapter(Sqtm.Properties.Settings.Default.SqtmDbConnectionString, insertConnection); SqlCommand updateCmd = new SqlCommand("UPDATE General_Info " + "Quote_ID = @Quote_ID, " + "Open_Quote = @Open_Quote, " + "OEM_Name = @OEM_Name, " + "Qty = @Qty, " + "Quote_Num = @Quote_Num, " + "Fab_Drawing_Num = @Fab_Drawing_Num, " + "Rfq_Num = @Rfq_Num, " + "Rev_Num = @Rev_Num " + "WHERE Quote_ID = @Quote_ID"); updateCmd.Connection = insertConnection; System.Data.SqlClient.SqlParameterCollection param = updateCmd.Parameters; // // Add new SqlParameters to the command. // param.AddWithValue("Open_Quote", newQuote.OpenQuote); param.AddWithValue("Customer_Name", newQuote.CustomerName); param.AddWithValue("OEM_Name", newQuote.OEMName); param.AddWithValue("Qty", newQuote.Qty); param.AddWithValue("Quote_Num", newQuote.QuoteNumber); param.AddWithValue("Fab_Drawing_Num", newQuote.FdNumber); param.AddWithValue("Rfq_Num", newQuote.RfqNumber); param.AddWithValue("Rev_Num", newQuote.RevNumber); adapter.UpdateCommand = updateCmd; adapter.Update(mds.Tables[0]); mds.AcceptChanges(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } Thanks in advance to anyone who can help, I really appreciate it, Andrew

    Read the article

  • ExtJS Portal - Columns of different sizes

    - by needshelp
    I need to be able to use different size columns in the ExtJS portal. For example, I want in the center region, one area which has room for one big widget, and then right below it, 2 areas for 2 smaller widgets. I keep trying to play with the columns to figure this out, but nothing seems to work. Help?

    Read the article

  • Multiple Columns as Primary keys

    - by rockbala
    CREATE TABLE Persons ( P_Id int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255), CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName) ) The above example is taken from w3schools. From the above example, my understanding is that both P_Id, LastName together represents a Primary Key for the table Persons, correct ? Another question is why would some one want to use multiple columns as Primary keys instead of a single column ? How many such columns can be used in together as Primary key in a given table ? Thanks Balaji S

    Read the article

  • Any way to change Phppgadmin view order of columns without changing underlying db

    - by nick
    Hey everyone, Is there any way to change the order of the columns phppgadmin views when browsing tables without having to change the underlying db? I have a few columns that I want seperated by heaps of unimportant ones and then a few more important ones at the end. The problem is that the important ones on the right are way of the screen so its hard to check visually if data has been inputed correctly. Cheers

    Read the article

  • Setting number of columns programmatically in TableLayout

    - by TiGer
    Hi, I have an XML layout which contains a TableLayout with an unknown number of TableRows... The number of Rows will be established durin runtime, what I do know though is that I want two columns... So I have a couple of questions regarding this : - is there a way to set the whole TableLayout to have 2 columns ? - is there a way programmatically to give an id to the (during runtime) created TableRows which will be placed within the TableLayout, so I can reference them later on from other parts of the software ?

    Read the article

  • Change table columns width on resizing window or splitter

    - by Narek
    Consider there is a QTablWidget and a QTextEdit. Both of them are in a horisontal QSplitte. Let the QTable widget has 2 columns. The problem is to resize the table columns' width as you do resize operation by moving the splitter with mouse. Are there any options to may colums to be resized synchornosly with the table? Thanks.

    Read the article

  • delete all but minimal values, based on two columns in SQL Server table

    - by sqlill
    how to write a statement to accomplish the folowing? lets say a table has 2 columns (both are nvarchar) with the following data col1 10000_10000_10001_10002_10002_10002 col2 10____20____10____30____40_____50 I'd like to keep only the following data: col1 10000_10001_10002 col2 10____10____30 thus removing the duplicates based on the second column values (neither of the columns are primary keys), keeping only those records with the minimal value in the second column. how to accomplish this?

    Read the article

  • Indexing Service: getting empty columns on custom properties

    - by itchi
    I'm following this example: http://www.codinghorror.com/blog/2005/12/getting-started-with-indexing-service.html However, the conversion to dataset shows empty columns for my custom properties. If I use path or filename for the columns I get data back. I have set the properties to be cached, have tried both levels, and have rescanned full. I've tried this example on my desktop (windows vista 32bit) and on a Windows 2008 R2 server with the same results.

    Read the article

  • SharePoint weekly summary alert with calculated columns

    - by Geoff
    I have a SharePoint list that accepts incoming email and has two calculated columns based on the Email Subject. Immediate alerts, RSS etc all work fine but the Weekly Summary Alert has #VALUE! for all the calculated columns. Is there a reason for this? Can I get it to show that actual calculated value?

    Read the article

  • How to reliably retrieve tables and columns information stored in Torque Criteria object

    - by David Zhao
    Hi there, Is there a way to retrieve tables, including alias tables, and columns, including alias columns, from an Apache Torque Criteria object reliably? I understand that there is methods like: getSelectedColumns, getAsColumns(), getJoins(), etc., but for examples, getJoins() will just return a list of joined tables strings in free text, where one has to use regular expression to extract the needed joined table information out of it. Thanks in advance! David

    Read the article

  • Getting fewer columns with hibernate

    - by Gandalf StormCrow
    I have a table with 11 columns, but I need to get only 2 of them in my application, I'm using spring/hibernate/DAO combination. For now I have a domain class which includes all 11 fields, and mapping file which maps all 11 columns in table. How do I use get just 2 of them not all?

    Read the article

  • SQL : Select a dynamic number of rows as columns

    - by Clint
    I need to select static colums + a dynamic number of rows as columns in SQL TABLE 1 ------- HotelID BlockID BlockName TABLE 2 ------- BlockDate (unknown number of these) NumberOfRooms Desired Result Row ------------------ HotelID | BlockID | BlockName | 02/10/10 | 02/11/10 | 02/12/10 | ...N Where the date columns are the unknown number of BlockDate rows.

    Read the article

  • WPF DataGrid bind data between columns

    - by Markus2k
    Lets say I have 2 columns in my data Grid: Column A: Selected, and Column B: Name. The Selected column is a checkbox. And Name column is text field. I want to set the color of the text in 'Name' column as Blue if Column A's check box is checked, and Red otherwise. Essentially I don't know how to bind data between columns of the datagrid. And sample code/link providing example would be useful.

    Read the article

  • show/hide html table columns using css

    - by Art Peterson
    I want to display a basic html table with controls to toggle showing/hiding of additional columns: <table id="mytable"> <tr> <th>Column 1</th> <th class="col1">1a</th> <th class="col1">1b</th> <th>Column 2</th> <th class="col2">2a</th> <th class="col2">2b</th> </tr> <tr> <td>100</td> <td class="col1">40</td> <td class="col1">60</td> <td>200</td> <td class="col2">110</td> <td class="col2">90</td> </tr> </table> So Column 1 and Column 2 will be the only columns displayed by default - but when you click on the Column 1 I want 1a and 1b to toggle, and same with Column 2 with 2a and 2b. I may end up with more columns and lots of rows - so any javascript looping approaches have been too slow to work with when I tested. The only approach that seems to be fast enough is to set up some css like this: table.hide1 .col1 { display: none; } table.hide2 .col2 { display: none; } table.hide3 .col3 { display: none; } table.show1 .col1 { display: table-cell; } table.show2 .col2 { display: table-cell; } table.show3 .col3 { display: table-cell; } And then set up onClick function calls on the table header cells that will trigger a toggle - and determine which css class to set "mytable" to that will create the toggle effect that I'm looking for. Is there an easy way to set this up so that the code can work for n # of columns?

    Read the article

  • Extracting columns from text file using PowerShell

    - by atricapilla
    Hi, I have to extract columns from a text file explained in this post: http://stackoverflow.com/questions/2499746/extracting-columns-from-text-file-using-perl-similar-to-unix-cut but I have to do this also in a Windows Server 2008 which does not have Perl installed. How could I do this using PowerShell? Any ideas or resources? I'm PowerShell noob...

    Read the article

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