Click here to Skip to main content
15,914,074 members
Home / Discussions / C#
   

C#

 
Questiondelete a control containing label and textbox while assigning text at runtime Pin
trulyyy27-Jul-07 22:57
trulyyy27-Jul-07 22:57 
AnswerRe: delete a control containing label and textbox while assigning text at runtime Pin
Martin#30-Jul-07 10:38
Martin#30-Jul-07 10:38 
Questioni have design a controle using following code Pin
cuteAisha27-Jul-07 22:56
cuteAisha27-Jul-07 22:56 
AnswerRe: i have design a controle using following code Pin
Guffa27-Jul-07 23:12
Guffa27-Jul-07 23:12 
GeneralRe: i have design a controle using following code Pin
cuteAisha28-Jul-07 1:39
cuteAisha28-Jul-07 1:39 
AnswerRe: i have design a controle using following code Pin
Luc Pattyn28-Jul-07 2:04
sitebuilderLuc Pattyn28-Jul-07 2:04 
Questionapplication connect to sql data base Pin
prasadbuddhika27-Jul-07 22:43
prasadbuddhika27-Jul-07 22:43 
AnswerRe: application connect to sql data base Pin
Colin Angus Mackay27-Jul-07 23:08
Colin Angus Mackay27-Jul-07 23:08 
prasadbuddhika wrote:
i want to know how to connect the application to the db


SqlConnection conn = new SqlConnection(theConnectionString);
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = anySqlCommand;
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();


theConnectionString is defines where and how to connect to your database. For the functions you wish to carry out you will need a connection with sysadmin privileges. See http://www.connectionstrings.com[^] for details on what connection strings look like.

anySqlCommand is a string that can be pretty much any command that SQL Server understands. You can even dump entire scripts in there. The only thing it can't deal with is the GO, because that isn't SQL, it is a delimiter that Query Analyzer or the SQL Server Management Studio uses to separate batches of SQL statements.


Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...

"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."


My website

QuestionRefreshing a Form Pin
sangramkp27-Jul-07 21:46
sangramkp27-Jul-07 21:46 
AnswerRe: Refreshing a Form Pin
ekynox27-Jul-07 21:49
ekynox27-Jul-07 21:49 
GeneralRe: Refreshing a Form Pin
sangramkp27-Jul-07 21:57
sangramkp27-Jul-07 21:57 
GeneralRe: Refreshing a Form Pin
ekynox27-Jul-07 23:17
ekynox27-Jul-07 23:17 
GeneralRe: Refreshing a Form Pin
sangramkp28-Jul-07 0:03
sangramkp28-Jul-07 0:03 
Questionhi friends Pin
Baljit Singh Grewal27-Jul-07 20:58
Baljit Singh Grewal27-Jul-07 20:58 
AnswerRe: hi friends Pin
Christian Graus27-Jul-07 21:31
protectorChristian Graus27-Jul-07 21:31 
AnswerRe: hi friends Pin
Guffa27-Jul-07 21:57
Guffa27-Jul-07 21:57 
Questionselect from DataBase Pin
Thaer Hamael27-Jul-07 18:10
Thaer Hamael27-Jul-07 18:10 
AnswerRe: select from DataBase Pin
Christian Graus27-Jul-07 18:24
protectorChristian Graus27-Jul-07 18:24 
AnswerRe: select from DataBase Pin
Paul Conrad27-Jul-07 19:44
professionalPaul Conrad27-Jul-07 19:44 
QuestionSelecte max(Feild)from Pin
Thaer Hamael27-Jul-07 17:58
Thaer Hamael27-Jul-07 17:58 
AnswerRe: Selecte max(Feild)from Pin
Paul Conrad27-Jul-07 19:44
professionalPaul Conrad27-Jul-07 19:44 
QuestionPointers Performance Pin
Leslie Sanford27-Jul-07 16:53
Leslie Sanford27-Jul-07 16:53 
AnswerRe: Pointers Performance Pin
J. Dunlap27-Jul-07 17:37
J. Dunlap27-Jul-07 17:37 
AnswerRe: Pointers Performance Pin
Luc Pattyn27-Jul-07 17:50
sitebuilderLuc Pattyn27-Jul-07 17:50 
GeneralRe: Pointers Performance Pin
Leslie Sanford27-Jul-07 18:39
Leslie Sanford27-Jul-07 18:39 

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.