Click here to Skip to main content
15,895,793 members
Home / Discussions / C#
   

C#

 
QuestionDisplaying Progress Pin
Rizwan Rathore19-May-06 2:39
Rizwan Rathore19-May-06 2:39 
AnswerRe: Displaying Progress Pin
MohammadAmiry19-May-06 3:26
MohammadAmiry19-May-06 3:26 
GeneralRe: Displaying Progress Pin
Rizwan Rathore19-May-06 7:45
Rizwan Rathore19-May-06 7:45 
GeneralRe: Displaying Progress Pin
Limey42021-May-06 11:41
Limey42021-May-06 11:41 
Questiontable to label - basics(asp&c#) Pin
locaas19-May-06 1:55
locaas19-May-06 1:55 
AnswerRe: table to label - basics(asp&c#) Pin
pq4noeh19-May-06 2:13
pq4noeh19-May-06 2:13 
GeneralRe: table to label - basics(asp&c#) Pin
locaas19-May-06 2:21
locaas19-May-06 2:21 
GeneralRe: here you have the code Pin
pq4noeh21-May-06 22:01
pq4noeh21-May-06 22:01 
//i have not tryed the code so it might have some errors but i think you can get the idea

//SQL_COMMANDS (this commands will work only if you have a SQL Database)
//this command will return all the non system tables
SELECT Table_Name AS NOMBRE FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE '



//this will return all the column names from a given database and table

SELECT COLUMN_NAME as column FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME

string Query = "SELECT COLUMN_NAME as column FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME LIKE 'the_name_of_your_table'

//first you have to get all the column names of your table
Cache = new System.Data.DataSet();
using (SqlConnection Conn = new SqlConnection(this.Conexion))
{
SqlDataAdapter SqlDs = new SqlDataAdapter(Query,Conn);
Conn.Open();
SqlDs.Fill(Cache,NombreTabla);
}
//now you have all the column names and you have to iterate as many times as columns you have creating and adding to your form a lavel
//note that in your case the location will have to be assign dinamicly
foreah(DataRow row in Cache.DataTable["NombreTabla"].rows)
{
System.Windows.Forms.Label MyLabel = new System.Windows.Forms.Label();
MyLabel .Location = new System.Drawing.Point(64, 64);
MyLabel .Name = row[0].tostring();
MyLabel .Size = new System.Drawing.Size(376, 64);
MyLabel .TabIndex = 0;
MyLabel .Text = row[0].tostring();

//here we add the new label to the form
this.controls.add(MyLabel)
}

//i hope the code above can help you

NOthing by now;)
QuestionConect to the domain server Pin
pq4noeh19-May-06 1:33
pq4noeh19-May-06 1:33 
AnswerRe: Conect to the domain server Pin
Ryan Roberts19-May-06 2:14
Ryan Roberts19-May-06 2:14 
QuestionRegarding Crystel Reports Pin
A.Grover19-May-06 1:18
A.Grover19-May-06 1:18 
QuestionOptional Parameter Pin
NICE TO MEET19-May-06 1:02
NICE TO MEET19-May-06 1:02 
AnswerRe: Optional Parameter Pin
Rei Miyasaka19-May-06 1:14
Rei Miyasaka19-May-06 1:14 
AnswerRe: Optional Parameter Pin
KrIstOfK19-May-06 2:06
KrIstOfK19-May-06 2:06 
Questionhow to extract motion vector from MPEG4 video? Pin
Raùl19-May-06 0:54
Raùl19-May-06 0:54 
AnswerRe: how to extract motion vector from MPEG4 video? Pin
leppie19-May-06 1:14
leppie19-May-06 1:14 
QuestionDisplaying controls still not working Pin
Brendan Vogt19-May-06 0:48
Brendan Vogt19-May-06 0:48 
AnswerRe: Displaying controls still not working Pin
_AK_19-May-06 1:29
_AK_19-May-06 1:29 
AnswerRe: Displaying controls still not working Pin
BoneSoft19-May-06 4:54
BoneSoft19-May-06 4:54 
QuestionRe: Displaying controls still not working [modified] Pin
Brendan Vogt22-May-06 21:07
Brendan Vogt22-May-06 21:07 
QuestionHow to Increase the header height of datagrid in c# windows application Pin
Qutub19-May-06 0:14
Qutub19-May-06 0:14 
AnswerRe: How to Increase the header height of datagrid in c# windows application Pin
Mukesh Karir19-May-06 1:28
Mukesh Karir19-May-06 1:28 
QuestionInstant Messenger in C# Pin
rev 'ed18-May-06 23:59
rev 'ed18-May-06 23:59 
AnswerRe: Instant Messenger in C# Pin
Robert Rohde19-May-06 0:09
Robert Rohde19-May-06 0:09 
AnswerRe: Instant Messenger in C# Pin
Yulianto.19-May-06 0:34
Yulianto.19-May-06 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.