Click here to Skip to main content
15,890,973 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
BillWoodruff23-Oct-13 18:52
professionalBillWoodruff23-Oct-13 18:52 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
joost.versteegen24-Oct-13 3:23
joost.versteegen24-Oct-13 3:23 
GeneralRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
BillWoodruff24-Oct-13 17:48
professionalBillWoodruff24-Oct-13 17:48 
AnswerRe: C# WinForms: Is putting a Form inside a Form a "Bad Thing" ? Pin
WuRunZhe30-Oct-13 14:50
WuRunZhe30-Oct-13 14:50 
Questionclosing second form without closing first form Pin
alfie.max1522-Oct-13 23:34
alfie.max1522-Oct-13 23:34 
AnswerRe: closing second form without closing first form Pin
BillWoodruff23-Oct-13 2:20
professionalBillWoodruff23-Oct-13 2:20 
GeneralRe: closing second form without closing first form Pin
alfie.max1524-Oct-13 7:21
alfie.max1524-Oct-13 7:21 
QuestionSQL Server Connection Pin
Member 1035350322-Oct-13 17:43
Member 1035350322-Oct-13 17:43 
I can not make a data connection to SQL Server 2012. Everything is located on my laptop. I am a beginner trying to learn C#. I can access the database via a dataset with no problem. I have tried both: using System.Data.SqlClient;
using MySql.Data.MySqlClient;


SQLServer Login = SINGER1990-PC\SQLEXPRESS
Laptop Admin = singer1990
Here is the code to populate a combo box
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using System.Data.SqlClient;




namespace Access
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'pOSNowDataSet.tblItem' table. You can move, or remove it, as needed.
this.tblItemTableAdapter.Fill(this.pOSNowDataSet.tblItem);

}

private void Form1_Load_1(object sender, EventArgs e)
{

}

private void button2_Click(object sender, EventArgs e)
{
//This still causes error because cannot get correct server name
SqlConnection cs = new SqlConnection("SERVER=singer1990-pc\\sqlexpress-PC;DATABASE=POSNow;Trusted_Connection=True");
SqlDataAdapter da = new SqlDataAdapter("Select * FROM tblItem", cs);

DataTable dt = new DataTable();

da.Fill(dt);

//for (int i = 0; i < dt.Rows.Count; i++)
{
// cboSelectName.Items.Add(dt.Rows[i]["itemSKU"]);
cboSelectName.Items.Add("itemSKU");
}
}


}
}
AnswerRe: SQL Server Connection Pin
Ron Beyer22-Oct-13 18:06
professionalRon Beyer22-Oct-13 18:06 
AnswerRe: SQL Server Connection Pin
Nicholas Marty22-Oct-13 23:27
professionalNicholas Marty22-Oct-13 23:27 
QuestionC# Open Windows 8 Keyboard Pin
Kevin Marois22-Oct-13 13:15
professionalKevin Marois22-Oct-13 13:15 
AnswerRe: C# Open Windows 8 Keyboard Pin
BillWoodruff22-Oct-13 21:37
professionalBillWoodruff22-Oct-13 21:37 
QuestionParsing an XML File Pin
MarkB12322-Oct-13 9:18
MarkB12322-Oct-13 9:18 
AnswerRe: Parsing an XML File Pin
Richard Deeming22-Oct-13 9:38
mveRichard Deeming22-Oct-13 9:38 
GeneralRe: Parsing an XML File Pin
MarkB12322-Oct-13 10:03
MarkB12322-Oct-13 10:03 
GeneralRe: Parsing an XML File Pin
Richard Deeming22-Oct-13 10:59
mveRichard Deeming22-Oct-13 10:59 
GeneralRe: Parsing an XML File Pin
MarkB12323-Oct-13 6:49
MarkB12323-Oct-13 6:49 
QuestionHow to Get Site ID and site status in IIS 7 using Web Administration Pin
Member 1032854322-Oct-13 4:11
Member 1032854322-Oct-13 4:11 
QuestionHow to access .chm file present in zip file in C# winform application ? Pin
Pratik_P21-Oct-13 21:35
Pratik_P21-Oct-13 21:35 
AnswerRe: How to access .chm file present in zip file in C# winform application ? Pin
Marco Bertschi21-Oct-13 21:50
protectorMarco Bertschi21-Oct-13 21:50 
GeneralRe: How to access .chm file present in zip file in C# winform application ? Pin
Pratik_P21-Oct-13 22:00
Pratik_P21-Oct-13 22:00 
SuggestionRe: How to access .chm file present in zip file in C# winform application ? Pin
Eddy Vluggen21-Oct-13 22:30
professionalEddy Vluggen21-Oct-13 22:30 
AnswerRe: How to access .chm file present in zip file in C# winform application ? Pin
Marco Bertschi21-Oct-13 22:39
protectorMarco Bertschi21-Oct-13 22:39 
NewsRe: How to access .chm file present in zip file in C# winform application ? Pin
Pratik_P21-Oct-13 23:02
Pratik_P21-Oct-13 23:02 
GeneralRe: How to access .chm file present in zip file in C# winform application ? Pin
Marco Bertschi21-Oct-13 23:05
protectorMarco Bertschi21-Oct-13 23:05 

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.