Click here to Skip to main content
15,889,651 members
Home / Discussions / C#
   

C#

 
QuestionHmm... External Methods? Pin
jas0n235-May-09 21:47
jas0n235-May-09 21:47 
AnswerRe: Hmm... External Methods? Pin
Pete O'Hanlon5-May-09 22:18
mvePete O'Hanlon5-May-09 22:18 
GeneralRe: Hmm... External Methods? Pin
jas0n236-May-09 0:45
jas0n236-May-09 0:45 
QuestionHow i use the connection string for making a connection object.. Pin
ddravin20005-May-09 21:33
ddravin20005-May-09 21:33 
AnswerRe: How i use the connection string for making a connection object.. Pin
Member 44703545-May-09 21:42
Member 44703545-May-09 21:42 
GeneralRe: How i use the connection string for making a connection object.. Pin
ddravin20005-May-09 21:54
ddravin20005-May-09 21:54 
AnswerRe: How i use the connection string for making a connection object.. Pin
Member 44703545-May-09 22:01
Member 44703545-May-09 22:01 
QuestionProblem with Datagrid Pin
yueru5-May-09 21:30
yueru5-May-09 21:30 
It's said that "Don't have par(my table)" and alway have error with sql_cmd.ExecuteNonQuery(); coz my file have # it can't read #
<pre>
private SQLiteConnection sql_con;
private SQLiteCommand sql_cmd;
private SQLiteDataAdapter DB;
private DataSet DS = new DataSet();
private DataTable DT = new DataTable();


private void SetConnection()
{
sql_con = new SQLiteConnection("Data Source=pare.db;Version=3;New=False;Compress=True;");
// sql_con = new SQLiteConnection("Data Source=pare.db;Version=3;New=True;Compress=True;"); if I want to create new database
}

private void ExecuteQuery(string txtQuery)
{
<big> sql_con.Open();</big>
sql_cmd = sql_con.CreateCommand();
sql_cmd.CommandText = txtQuery;
<big> sql_cmd.ExecuteNonQuery(); </big>
sql_con.Close();
}
</pre>

<pre>
private void LoadData()
{
sql_con.Open();
sql_cmd = sql_con.CreateCommand();
string CommandText = "select * from par";
DB = new SQLiteDataAdapter(CommandText, sql_con);//นำข้อมูลออกมา
DS.Reset();
DB.Fill(DS);//นาม ข้อมูลปายส่ายนาย ดาต้าเซด
DT = DS.Tables[0];
dataGridView1.DataSource = DT;

sql_con.Close();
}


private void button2_Click(object sender, EventArgs e)
{
SetConnection();
LoadData();
}
</pre>
It has error on the BIG D'Oh! | :doh:

NO MORE TEAR
AnswerRe: Problem with Datagrid Pin
Mycroft Holmes5-May-09 21:34
professionalMycroft Holmes5-May-09 21:34 
GeneralRe: Problem with Datagrid Pin
yueru5-May-09 22:02
yueru5-May-09 22:02 
QuestionDebuging is not working in visual studio Pin
mahesvs5-May-09 21:18
mahesvs5-May-09 21:18 
AnswerRe: Debuging is not working in visual studio Pin
hongkunjiang5-May-09 21:27
hongkunjiang5-May-09 21:27 
GeneralRe: Debuging is not working in visual studio Pin
mahesvs5-May-09 21:32
mahesvs5-May-09 21:32 
AnswerRe: Debuging is not working in visual studio Pin
Nilesh Hapse5-May-09 21:28
Nilesh Hapse5-May-09 21:28 
GeneralRe: Debuging is not working in visual studio Pin
Mycroft Holmes5-May-09 21:30
professionalMycroft Holmes5-May-09 21:30 
GeneralRe: Debuging is not working in visual studio Pin
mahesvs5-May-09 21:33
mahesvs5-May-09 21:33 
QuestionChanging the icon of .exe file Pin
Rajdeep.NET is BACK5-May-09 21:00
Rajdeep.NET is BACK5-May-09 21:00 
AnswerRe: Changing the icon of .exe file Pin
Mycroft Holmes5-May-09 21:12
professionalMycroft Holmes5-May-09 21:12 
GeneralRe: Changing the icon of .exe file Pin
Rajdeep.NET is BACK5-May-09 22:45
Rajdeep.NET is BACK5-May-09 22:45 
GeneralRe: Changing the icon of .exe file Pin
Mycroft Holmes5-May-09 23:16
professionalMycroft Holmes5-May-09 23:16 
GeneralRe: Changing the icon of .exe file Pin
User 571511620-May-09 12:58
User 571511620-May-09 12:58 
GeneralRe: Changing the icon of .exe file Pin
Mycroft Holmes20-May-09 14:03
professionalMycroft Holmes20-May-09 14:03 
GeneralRe: Changing the icon of .exe file Pin
User 571511625-May-09 9:01
User 571511625-May-09 9:01 
QuestionHow to get resizable pointer for column on a grid Pin
honeyashu5-May-09 19:08
honeyashu5-May-09 19:08 
AnswerRe: How to get resizable pointer for column on a grid Pin
dan!sh 5-May-09 19:22
professional dan!sh 5-May-09 19:22 

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.