.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Two Columns of Floating Tables Only Allowing Next Two Tables to start together.

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
Hi,I am styling a form I have created. I have created a number of tables and I am trying to position them with CSS. However, for some reason each to the two tables are positioned together. So lets say the 1st table on the left is shorter than the table on the right. Then on the second row of tables they both start at the end of the table on the right. I just don't know where I am going wrong. There is no clear command or anything. Any help would be really appreciated. Thanks in advance,      Seamus

View Complete Post

More Related Resource Links

CSS float tables only allowing row of tables start at table header

Hi,I have a page of tables which take in information from the user. I am trying to get the tables to float to the right so I have two rows of tables. But for some reason. Each row of tables starts together. So there is a gap on one of the sides before the next table. Any help would be really appreciated  The CSS is .tableColumnFormat{    padding-top: 3px;    padding-bottom:3px;        width: 180px;    }.labelFormat{    float: left;    padding-left: 5px;    text-align: right;    font-size: medium;    width:180px;    }.tableFormat{        background-color:White;    width: 450px;    border:solid 1.5px #38a7db;        float: left;    margin-bottom:10px;    margin-left:10px;    margin-right:10px;}.tableColumnFormat2{    float:left;        padding-left:5px;    }.headerFormat{    text-align: left;    padding-left: 10px;    color:White;    background-image:url('App_Themes/MasterTheme/Images/table_header_background3.gif');    }

MS SQL Server: Search All Tables, Columns & Rows For Data or Keyword Query

If you need to search your entire database for specific data, this query will come in handy.

So when a client needs a custom report or some sort of custom development using Great Plains, most of the time I will have to track down the data in the system by running this query and find the table(s) it is in.

Discovering ODBC Tables, Columns and column Definitions

I have worked with ODBC data connections for a while.  Usually, I've setup a connection to some type of database (IBM ISeries, SQL Server, Progress, etc.) depending on the project and then I use MS Access to inspect or export the data using linked tables. I have a database that has numerous tables and columns.  In fact, I believe there are some 16k data columns in the entire database.  Furthermore, I have an excel file that gives me a list of all of these tables and a brief description of each column  but it does not have useful data types in the description.  What I would like to do is query the ODBC source and extract each table, it's columns and it's column data types. My end goal is to take the data from the spread sheet (column names and description) and insert that data into a database that also contains the correct, SQL data type in an additional field.  Is there a way to query an ODBC data source to acquire all of this information?


TABLE 1SELECT I.STUNA    ,S.SNO         ,SUM(B.AMT * Y.YEAR) AS AMT  FROM STUDENT S  LEFT JOIN INFO I ON S.SNO = I.SNO  LEFT JOIN BONUS B ON S.SNO = B.SSNO  LEFT JOIN YEAR  Y ON S.SNO = Y.SSNO  STUNA       SNO      AMTJOHN         A        10LISA         B        20ALLEN        C       100TABLE 2SNO   AMTA     1B     2C     3D     5I WANT TO HAVE RESULT LIKE THIS (TABLE1 + TABLE2)STUNA       SNO      AMTJOHN         A        11LISA         B        22ALLEN        C       103EDDIE        D         5I TRIED USE THIS QEURY SELECT I.STUNA    ,S.SNO         ,SUM(B

Search a word in all the tables(all columns) of a database

Dear Friends, I am developing the Home page of a Client. Apart from various things on this home page I have a text box and search button.Having said that, I have a database in which I have almost 12 tables with varying number of columns.Now my question is,Is there anyway to search a word typed by a user in the textbox to search it in all the tables(all columns) of the database.A simple,concise and easy to follow solution would be a great help.

problem seems to be related to grouping by on columns with the same name in different tables


using OLEDB provider IBMDADB2.1

and the following SQL run from ReportBuilder


sect.name as Team,

tasktype.name as TaskType,










The SQL runs fine in a DB2 query tool but when run through ReportBuilder I get

[DB2/LINUXX8664] SQL0119N  An expression starting with "TASKTYPE" specified in a SELECT clause, HAVING clause, or ORDER BY clause is not specified in the GROUP BY clause or it is in a SELECT clause, HAVING clause, or ORDER BY clause with a column function and no GROUP BY clause is specified.  SQLSTATE=42803


Basically the problem seems to be related to grouping by on columns with the same name in different tables.

Anyone know a work around?

Drop extended property "MS_Description" of ALL tables and ALL columns


Is there an easy way (a sql script) to drop the "MS_Description" of all tables and all columns in my database?


Regarding tables and columns


Dear All,

What would you all suggest a database with

less number of tables and more number of columns

more number of tables with less number of columns.

I am developing a web application using Visual stuio 2005 and Sql Server 2005

Thanks in Advance,

Getting list of tables with Identity Columns



I'm new to SQL Server, could somebody help me with the query for

Getting the list of tables with indentity columns i.e to check the key info in the system tables along with column data types.

Thanks in Advance


not using tables: how do i align two columns, with textboxes, labels, dropdownlists, radiobuttonlis


problems with my CSS:


the Address (line 2) textbox ,City textbox, State dropdownlist and Zipcode textbox are vertically cramped (not equally spaced apart). 

the City label, State Label, and Zipcode labes are not horizontally aligned.

the Contact Type label and the Email Address label are not horizontall aligned. 



<asp:TabPanel ID="tpAdd" runat="server" HeaderText="Add" >
                <div id="wrapper">
		<div id="content">

			<div id="left">

				<!-- 	use a container to avoid using padding and border on #left
						which causes cross-browser inconsistencies with width -->
				<div class="left-container"><br />
                <p style="margin-left: 40px">
                    <asp:Label ID="lblFirstName" runat="server" Text="First Name:"></asp:Label>
                    <asp:TextBox ID="tbFirstName" runat="server" CssClass="txtbox"></asp:TextBox>
                    <br />
                    <asp:Label ID="lblLastName" runat="server" T

comparing two database tables to all find matching columns



is there any query to find matching columns from two database tables(not system tables).




Thanks and regards, Rishabh

Does Linq dbml need refreshed after allowing cascade deletes on tables?


Hi all-

When setting up my database, I forgot to set the delete rule to cascade on foreign keys.  Now, I can't delete a user from the ASP.net control panel due to the FK constraints.  So, I need to go through all my tables and allow cascade delete on all keys.

Once I do this, will I need to redo  my Linq .dbml?  (ie: delete each table on it and drag it back on) or does it not matter?

Update table - based on result of 2 columns from other tables


MSSql 2008 (2000 state)

Trying to update a column in a mapping table based on if the mapping is correct.

Table 1 own car data (PK model_ID)
Table 2 external cardata (PK Styr_ID)
Table 3 User mapping between Table1 and Table2 (PK's model_ID and Styr_ID)

I have made quite a big SQL joining data from Table 1 and Table 2 to verify if mapping is correct - And I have retrieved all incorrect rows that needs to be updated in table3 - Succes... Now I need to update Table 3 based on these results..
- The result is 3500 rows containing both model_ID, Styr_ID (these I have inserted in a temp_table - Both it didn't help me out..)

The problem I can't figure out, is that I need both values to find the correct row and update it in table3..
The only way I can see it done, is by selecting twice - but then it's not nessesary that the values are from same row (i actually doubt that they ever are)

Update table3 set status = 'A' where ......   select model_ID, select Styr_ID

Better performance when all temp tables are at start of proc - STILL DON'T SEE WHY


I've already posted on this:


and was convinced even more by what was written in:



BUT when I actually tested a simple script with a profiler there was no difference in the number of deferred compiles (which is two) when all tables were at the start and when tables were spread in the procedure (According to the theory the second stored proc below should have produced only one deferred compile). This script completely contradicts the technical page link above. How can it be explained?




Getting server non system databases, getting database tables, getting table columns


I use next code to get server databases

string connectionString = "Data Source=DENIS\\SQLEXPRESS;Integrated Security=SSPI;";
DataTable tables = new DataTable("Tables");
using (SqlConnection connection =
    new SqlConnection(connectionString))
  SqlCommand command = connection.CreateCommand();
  command.CommandText = "sp_databases"; 
  command.CommandType = CommandType.StoredProcedure;


this.dataGridView1.DataSource = tables;

I've got many databases :

- model ( i guess it is system )

- master ( i guess it is system )

- tempdb ( i guess it is system )

- db1 ( my table )

and etc.

How to determinate what table is system.



FROM information_schema.Tables

So how to determinate what table is system or not.

Can I get tables of database

Join two tables on multiple columns


SQL Server 2008 R1

I have been successfully joining 2 tables on multiple fields with TSQL like:

SELECT a.* FROM a JOIN b ON b.field1 = a.field2 AND b.field3 = a.field4

My questions is:

1. Is this the best way to do this?

2. Are there limitations on how many fields you can JOIN ON or the size of these fields?

Now the specifics.

This application is inserting property conveyances (sales) from a source file (CombList), possibly with field corrections (CombListChanges). There are over 500,000 records in the source file each with a matching correction record. The UPDATE (shown below) updates the SourceID of the inserted records (approximately 350,000). The Conveyance INSERT (not shown) and the Conveyance UPDATE (shown below) each took 3-5 minutes to run.

The second query is an INSERT matching the Conveyances with a Real Property record. As written it runs for more than 2 hours and expands the tempdb to 10s of Gigabytes in size. I have never had it successfully execute. However if I run just the SELECT portion and eliminate the deedamount (money) and deedtype (nvarchar(10)) JOINs it runs in about 30 seconds (and gives me slightly too many records). The SourcePage (nvarchar(100)) is made up of a concatenation of several fields and text.

3. Any idea on why this INSERT won't run in a reasonable time?

How to change value in columns with same name in multiple tables


For a uncomplicated example, our database has 10 tables.  Each table contains the column COMPANY.  I need to change company from 1 to 4, and I don't want to have to update each table individually (because the number of tables is actually closer to 800).


COMPANY being a primary key isn't an issue. 


Is there a painless way to update the COMPANY field in all user defined tables?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend