|
yes u can do, bring all data into DataTabel...
|
|
|
|
|
Hello!
I know how to do extension methods and I'm pretty sure I could teach my cat to do them too, but is there a way to somehow have one external method, and use it in several different projects simply by referencing the file it is contained in? Would this be done in a class file ir DLL file? I'm pretty new to this stuff, and would appreciate any suggestions. Thanks for readin'.
Regards,
Jase
private void Yay()
{
DirectoryInfo Di = new DirectoryInfo("J:\\");
FileInfo[] Files = Di.GetFiles("*.*");
foreach( FileInfo file in Files )
{
// Do something constructive.
}
}
|
|
|
|
|
Either way could work, to be honest. It's up to you whether you want the overhead of an extra DLL, or you're happy having the code included as a link.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thank you Pete.
foreach( inch on Jason )
{
Girlfriend.IsHappier();
}
|
|
|
|
|
Hi ,
i made a connection string in app.config file. and i want to use this into my .cs file while creating connection object...
objSqlConnection1.ConnectionString = ?
please post the solution..
|
|
|
|
|
if your connection string is like this
add name="conn1" connectionString="string1"
ur access will be like this.
string conn = ConfigurationManager.ConnectionStrings[conn1].ConnectionString;
|
|
|
|
|
thanks !
but it gives an error "ConfigurationManager" does not exist into current context
|
|
|
|
|
add a reference in ur class file.
using System.Configuration;
|
|
|
|
|
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
NO MORE TEAR
|
|
|
|
|
indicates you have a problem with your connection string. Probably an invalid path for pare.db Try putting in the fully qualified path as this will be looking in the folder where the exe is created (debug).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I've already tried
It's still "no such table: par"
And what the problem with the # in sql_cmd.ExecuteNonQuery();
|
|
|
|
|
Hi
I have visual studio 2005 installed in my system and Windows Vista home OS. It is working fine but i cannot debug in the IDE though i gave the breakpoint and run the program in start debugging mode.
Your suggestions are highly valuable.
Thanks
Mahe
|
|
|
|
|
delete the *.pdb file in your debug folder,try again.
|
|
|
|
|
sorry i forgot to post, It is a web application..
|
|
|
|
|
Are you running the project in debug mode or release mode??
"Legacy code" often differs from its suggested alternative by actually working and scaling.
—Bjarne Stroustrup
|
|
|
|
|
And you expect a reply to this question
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
sorry i forgot to post, It is a web application.
|
|
|
|
|
Hi friends,
I went through google and MSDN in search for code samples that can be used to change the icon of an .exe file. But, I found softwares rather codes that claim to change the icon of .exe files! However, they are sharewares and can only display the desired icon on machine's where the software in particular is installed!
I went through the properties and all the tutorials on C# but did not find the a way to change the icon of an .exe programatically! Please help me out.
Hope to hear from you guys soon,
Rajdeep.NET
|
|
|
|
|
Is this your exe or someone elses exe?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Ok so have you set the icon in the projects Properties > Application > Default Icon
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
how can i change icon of .exe file ?
.exe file isnt my project.
can i swap icon of an .exe file with another .exe ??
thanks
|
|
|
|
|
BILLY_Mgs wrote: .exe file isnt my project.
What gives you the right to change someone elses application. I write software, I help people learn to develop applications, I do not help people bugger up someone elses application.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes I know you cant do this , plz do not spam ok ?
Guys there isnt any helpful code to extract icon from .exe file and change icon of .exe file with this icon?
Thanks
|
|
|
|
|
Hi,
I am using a Syncfusion virtual grid in my project
this grid has 3 columns.. I wanted to increase there size by dragging it's corner through mouse pointer .. How can i do that .. since i have seen this can be done only on those grids on which moving the mouse it will display that resize pointer
|
|
|
|