|
Hi Guys,
Mine was a dumbass developer faullt...well... din't realy knew once you create the file the creat method returns a stream so yea just changed my line of code abit
FileStream stream = fileInfo.Create();
stream.Close()
Hope your problem is as simple as this...
|
|
|
|
|
string FilePath = "C:\\Users\\VijayaShyam\\Documents\\Visual Studio 2008\\Projects\\UdayPowerSystems\\UdayPowerSystems\\PrintPage.txt";
System.Security.AccessControl.FileSecurity FS = new System.Security.AccessControl.FileSecurity("PrintFile.txt",System.Security.AccessControl.AccessControlSections.Access);
// string temp = "D:"; //System.IO.Path.GetTempPath();
FileStream fStream = File.Open(FilePath,FileMode.OpenOrCreate,FileAccess.ReadWrite,FileShare.ReadWrite);
fStream.SetAccessControl(FS);
// System.Security.AccessControl.DirectorySecurity dSec = Directory.GetAccessControl(fStream.Name);
fStream.GetAccessControl();
/// Which OS Your using
|
|
|
|
|
Hi guys i am getting my double values like:
3.1489789798E-6
Now i want this values in exact value lie:
0.003 some thing like this with out exponential...,
How its possible i searched in google i didnt get idea,
pla help me out in this,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
|
Can we Update records in the table using SqlBulkCopy
|
|
|
|
|
No
Unless you bulkcopy into another table and execute a proc to do the update
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
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
|
|
|
|