Click here to Skip to main content
15,920,508 members
Home / Discussions / C#
   

C#

 
AnswerRe: Multiple DataAdapters Pin
PIEBALDconsult17-May-09 16:22
mvePIEBALDconsult17-May-09 16:22 
Question[Message Deleted] Pin
hkjghkj117-May-09 9:13
hkjghkj117-May-09 9:13 
AnswerRe: fill already drown rectangle Pin
0x3c017-May-09 9:44
0x3c017-May-09 9:44 
GeneralRe: fill already drown rectangle Pin
Luc Pattyn17-May-09 9:54
sitebuilderLuc Pattyn17-May-09 9:54 
Questionsql server profiler Pin
behzadcp17-May-09 8:07
professionalbehzadcp17-May-09 8:07 
AnswerRe: sql server profiler Pin
Pete O'Hanlon17-May-09 8:40
mvePete O'Hanlon17-May-09 8:40 
GeneralRe: sql server profiler Pin
behzadcp18-May-09 7:33
professionalbehzadcp18-May-09 7:33 
QuestionSql Connection - Ado.net - question Pin
EmZan17-May-09 4:01
EmZan17-May-09 4:01 
when i'm trying to insert data into a sql server database
it shows the following error :



An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


//My Code


SqlConnection savecon = new SqlConnection();
savecon.ConnectionString ="Data Source=localhost; Initial Catalog=Iqdata";
savecon.Open();

string a = TextBox1.Text;
string b = TextBox2.Text;
string c = TextBox3.Text;
string d = TextBox4.Text;

SqlCommand savecom = new SqlCommand("insert into User values (15,a,b,c,d)", savecon);
int rows = savecom.ExecuteNonQuery();

savecon.Close();
AnswerRe: Sql Connection - Ado.net - question Pin
PIEBALDconsult17-May-09 4:11
mvePIEBALDconsult17-May-09 4:11 
GeneralRe: Sql Connection - Ado.net - question Pin
EmZan17-May-09 4:39
EmZan17-May-09 4:39 
GeneralRe: Sql Connection - Ado.net - question Pin
PIEBALDconsult17-May-09 16:23
mvePIEBALDconsult17-May-09 16:23 
AnswerRe: Sql Connection - Ado.net - question Pin
zhgfsh17-May-09 4:21
zhgfsh17-May-09 4:21 
AnswerRe: Sql Connection - Ado.net - question Pin
N a v a n e e t h17-May-09 4:49
N a v a n e e t h17-May-09 4:49 
Questiondatagrid Pin
coderneww17-May-09 3:47
coderneww17-May-09 3:47 
AnswerRe: datagrid Pin
OriginalGriff17-May-09 4:41
mveOriginalGriff17-May-09 4:41 
AnswerRe: datagrid Pin
Jeffrey Webster17-May-09 10:02
Jeffrey Webster17-May-09 10:02 
QuestionDataGridViewComboBoxColumn selection disappear Pin
Maddie from Dartford17-May-09 2:00
Maddie from Dartford17-May-09 2:00 
QuestionSplitting a string Pin
KIDYA17-May-09 1:25
KIDYA17-May-09 1:25 
AnswerRe: Splitting a string Pin
S. Senthil Kumar17-May-09 1:28
S. Senthil Kumar17-May-09 1:28 
GeneralRe: Splitting a string Pin
KIDYA17-May-09 1:30
KIDYA17-May-09 1:30 
GeneralRe: Splitting a string Pin
S. Senthil Kumar17-May-09 1:33
S. Senthil Kumar17-May-09 1:33 
GeneralRe: Splitting a string Pin
KIDYA17-May-09 1:51
KIDYA17-May-09 1:51 
AnswerRe: Splitting a string Pin
fly90417-May-09 1:33
fly90417-May-09 1:33 
GeneralRe: Splitting a string Pin
KIDYA17-May-09 1:54
KIDYA17-May-09 1:54 
GeneralRe: Splitting a string Pin
fly90417-May-09 2:02
fly90417-May-09 2:02 

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.