|
OMalleyW wrote:
I will look into BCWipe I read a little and it sounds very interesting.
Currently I use SDelete from Sysinternals that is a cool program also.
From what I understand (now) what I would like to write is no trivial task
and will require me to do far more research.
If you want to actually design your own algorythm (bad idea!) you will, but to just implement it yourself is trivial. All you'd need to do is copy the bit patterns used and sequentially write each to the entire file. What would be nice would be a program that would also wipe 'underneath' existing files. It shouldn't be that hard to do either.
|
|
|
|
|
Hi Every body
I have a usercontrol (Named DatePicker) with a property called 'Date'.This is the syntax of this property :
<code>
[Category("Date Info"),Bindable(true)]
public string Date
{
get
{return this.dateString;}
set
{this.dateString = value;}
}
</code>
This control also have some string properties (Day,Year and month)without 'Bindable(true)'Attribute.I use this user control and bind the 'Date' property of this control to a string column of a DataView in my form :
<code>
this.datePicker1.DataBindings.Ad("Date",this.dvDataSource,"Birthday");</code>
When I delete all rows of dataview whith this code :
<code>
this.BindingContext[this.dvDataSource].RemoveAt(this.BindingContext[this.dvDataSource].Position);
</code>
and then try to add a new row using the following code,
<code>this.BindingContext[this.dvDataSource].AddNew();</code>
I receive the following Exception :
"DataBinding could not find a row in the list that is suitable for all bindings"
Note :
When I comment the line of code that contains instruction for Binding this property,everything works ok.I bound some other controls (Like DataGrid and TextBox) to the other columns of DataView.They haven't any problem !!
Please help me if anyone knows the answer.
Best Regards.
[ _ Always there is another way _ ]
|
|
|
|
|
I need to include a .dll and an .ocx in my application.
How can I do that;
Thanks.
Osvaldo Rosario
Email: orosario@multisysid.com
-- modified at 10:44 Thursday 1st September, 2005
|
|
|
|
|
If you mean that you need to use unmanaged dll and ocx in your application
For Dll you can use P/Invoke to use function from unmanaged dll in your application
look at this article Calling Win32 DLLs in C# with P/Invoke[^]
For OCX
write click in toolbox select
Add remove items ...
then select com tab ---> select ocx you want it will be display in toolbox
MCAD
|
|
|
|
|
I want to write a program in C#. I have met a problem which i want to control the scanner and get the image.How to do it?Thanks~~
|
|
|
|
|
Hi All,
Is there any better and reliable method to watch for directories then filesystemwatcher.I am watching all files and folders on fixed drives.The behaviour of filesystemwatcher is different for different files for example for a .txt file if something is changed it fires the change event two times.for .xls file change event will fire even if it had been just opened also sometimes it shows it as deleted and then renamed when there is nothing being changed in the file.for .mdb file the creation and change both event fires just on creation.Is there any other reliable method.Thanks in advance.
|
|
|
|
|
This is not because the FileSystem watch treats different file types differently. You're actually getting some insights as to how those applications really behave! No matter what you use to monitor the file system, you'll see the same behaviors.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi dave,
thanks for that information.Actually I want to know when a particular file is being modified.even the File.GetLastWriteTime does not help as in the case of .xls file it gives me the last access time.and there are other files type also.is there any way by which i can find whenever any file is being modified.thanks in advance.
|
|
|
|
|
"Being modified" can't be tracked. In the case of Notepad, it opens the file, reads it, then closes it. When the file is saved, the filename is opened, written, then closed. That's it.
Excel/Word is almost the same way, but they involve saving to temp files, deleting the originals, and renaming the temps file to the old filenames.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Internet explorer's back and forward button can forbidden? How do it?
|
|
|
|
|
I doubt it. If it can be done, it would only be with the use of Browser Helper Objects, look it up on MSDN.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Cops & Robbers
Judah Himango
|
|
|
|
|
Maybe this is a dumb question. If I have MS SQL Server Desktop Edition, can I access the database from a seperate computer? Or do I need SQL Server for that? 'Cause I sure can't afford to get SQL Server, and my database application is only going to be deployed on 3-5 computers.
Thanks for the help.
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
theStorminMormon wrote:
Maybe this is a dumb question. If I have MS SQL Server Desktop Edition, can I access the database from a seperate computer? Or do I need SQL Server for that? 'Cause I sure can't afford to get SQL Server, and my database application is only going to be deployed on 3-5 computers.
You can use MSDE 2000 from other computers on the network. I do this all the time.
Providing the correct permissions are set then you should have no problems.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
OK - so just to be absolutely clear, if I run MSDE 2000 on a "server" (it's actually just my desktop running win xp pro) and I deploy an application to my client (my laptop) that accesses a database on my server via MSDE 2000 - that should work? Right now my application runs fine on the server, but it can't find the database from the client. This is connection string:
private string strConn = @"Integrated Security=SSPI; Packet Size=4096 ;Data Source=""EC-BJACOBS""; Initial Catalog=BenefitSelectDBSQL; Provider=""SQLOLEDB""; Workstation ID=""EC-BJACOBS""; Use Encryption for Data=False";
Next question - how do I set the correct permissions?
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
theStorminMormon wrote:
private string strConn = @"Integrated Security=SSPI; Packet Size=4096 ;Data Source=""EC-BJACOBS""; Initial Catalog=BenefitSelectDBSQL; Provider=""SQLOLEDB""; Workstation ID=""EC-BJACOBS""; Use Encryption for Data=False";
Next question - how do I set the correct permissions?
You are currently using Windows Authentication? Do you have a domain controller that manages your user security? If so, just add the domain users as users in your database and give them the required permissions.
If you don't have a domain controller, then it becomes a bit of a pain to use Windows Authentication. It is easier to create SQL users and change the connection string to use SQL authentication.
Michael
CP Blog [^] Development Blog [^]
|
|
|
|
|
When I originally installed and set up MSDE 2000 and my database, I had no clue what I was doing. The directions were unclear (to me) and I considered myself extraordinarily lucky when my program actually connected to the database at all (I still don't understand the connection between the database that I designed in Access, MSDE 2000, the SQL Server, and my C# application). What I'm trying to convey with all of this is that it's purely accidental that I ended up using Windows Authentication, and I would prefer to create SQL users and change the connection string to use SQL authentication if only I knew how.
Can you give some pointers on how to do this? The only access I have to MSDE 2000 on my own machine is too click on the little icon in the system tray - which brings up the SQL Service Manager (which doesn't let me do anything useful).
I just downloaded DbaMgr2k to try and get better access to the server (to add users, change authentication type) but I'm not sure how this works.
Any help you could offer would be great. I have books on C#, ADO.NET, and MS Access, but running MSDE 2000 seems to fall between the cracks and each book only offers tidbits on how to use it.
Thanks.
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
Hehe, that's about the way I felt when installing MSDE for the first time.
Having access to the EnterpriseManager of a "full" SQLServer helps alot, though.
MSDE basically is a full SQLServer with only performance-related restrictions, so you can use all the built-in stored procedures, for example, to manage database access, users and so on.
Try opening a command shell and type "osql -E" to open up an SQL-"shell" you can use to query your databases.
Some time ago I found the online documentation for SQLServer2000 on microsoft.com. Pretty complete, helped me a lot. For example, it lists the stored procedures available and how to execute them.
You can download it here[^]
Regards,
mav
|
|
|
|
|
Thanks, I'm downloading it now. Hopefully it will help.
The ends can never justify the means. It is the means that determine the ends.
|
|
|
|
|
hi
Just wondered if any knew of a simple way to control the PC's volume
within c# ?
Cheers
Richard
|
|
|
|
|
Hi,
I have to update a program while it is working. First i stop the process of programme then i copy new files and restart the process of program.At this time i see 2 system tray icon of my programme. When i move mouse over them the killed process's icon removes itself. But i want it to be destroyed when i first kill it's process.Could someone help me plz?
--junior coder--
|
|
|
|
|
Hi,
I have a little problem: I'm trying to open notepad.exe from my windows application and I'm using a Process and WaitForExit on it. Notepad stats correctly but when I try to move its windows I see the movement on the caller application. Does anyone know why and how can I fix it?
Here there's the code:
Process newProcess = new Process();
newProcess.StartInfo.FileName = filename;
newProcess.Start();
newProcess.WaitForExit();
thanks!
Loveday
-- modified at 9:05 Thursday 1st September, 2005
|
|
|
|
|
Loveday78 wrote:
see the movement on the caller application
Could you explain it a bit more?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Sorry, i'll try:
when i move notepad's window i see as if there were many windows; a sort of tail stating from the original location and ending in the new location of the window. This only on the screen's region over the "parent" application (the one that started the process).
I have no problem if i don't use WaitForExit (but i need to).
Better?
-- modified at 2:44 Friday 2nd September, 2005
|
|
|
|
|
Use threading to start notepad on a new thread.
www.lovethosetrains.com
|
|
|
|
|
Hi!
I'm trying to copy data from Oracle to Access 2000. For this project, I'm not allowed to use ADO.NET 2.0 unfortunately (BulkCopy would really help me), so I'm trying to do it by myself. My idea is to create a DataSet with the data of Oracle, and to push it in my Access database. For this I use the "DataSet.Merge" method and then the "DataAdapter.Update" method to write down the data. I don't have any error coming out, but nothing is written in the Acces DB.
Has someone met the same problems??
Has someone a better solution??
Many thanks in advance.
I join a copy of my code too :
using System;
using System.Data;
using System.Data.Odbc;
namespace consoOracle
{
///
/// Test connexion à Oracle
///
class afficheData
{
private OdbcDataAdapter da;
private DataSet ds;
int scr_no = 905;
public afficheData()
{
lireDataDsOracle();
ecrireDataDsAccess();
}
public void lireDataDsOracle()
{
//1. connexion à Oracle
System.Data.Odbc.OdbcConnection connOra;
connOra = new System.Data.Odbc.OdbcConnection();
connOra.ConnectionString = "DSN=ORA;Uid=uid;Pwd=pwd;";
try
{
//2. préparer une requète
string rqt = "Select LOC_C_LIBELLE_LONG As LOC_C_NOMLOCAL, "
+ "LOC_C_LIBELLE_COURT As LOC_C_NOMLOCALABREGE "
+ "From GEVI_T_LOCAL "
+ "Where LOC_SCR_N_ID = "+scr_no;
OdbcCommand cmd = new OdbcCommand(rqt, connOra);
da = new OdbcDataAdapter();
da.SelectCommand = cmd;
//3. ouvrir la connexion
connOra.Open();
//4. remplir le DataSet
ds = new DataSet();
da.Fill(ds, "Locaux");
// Console.WriteLine(ds.GetXml());
Console.WriteLine("C'est lu");
}
finally
{
//6. fermer tout
connOra.Close();
}
} //lireDataDsOracle()
public void ecrireDataDsAccess()
{
//1. connexion à Access
System.Data.Odbc.OdbcConnection connAcc;
connAcc = new System.Data.Odbc.OdbcConnection();
connAcc.ConnectionString = "DSN=ACC";
try
{
//2. préparer une requète
string rqt = "Select LOC_C_NOMLOCAL, "
+"LOC_C_NOMLOCALABREGE "
+"From GIDE_T_LOCAUX";
OdbcCommand cmd = new OdbcCommand(rqt, connAcc);
OdbcDataAdapter daAcc;
DataSet dsAcc;
daAcc = new OdbcDataAdapter();
daAcc.SelectCommand = cmd;
//3. ouvrir la connexion
connAcc.Open();
//4. remplir le DataSet
dsAcc = new DataSet();
daAcc.Fill(dsAcc, "Locaux");
//5. Merge
dsAcc.Merge(ds);
dsAcc.AcceptChanges();
//6. Ecriture
rqt = "Insert Into GIDE_T_LOCAUX ("
+"LOC_C_NOMLOCAL, "
+"LOC_C_NOMLOCALABREGE) "
+"Values ('@nom', '@nomAbrege'"
+")";
cmd = new OdbcCommand(rqt, connAcc);
cmd.Parameters.Add("@nom", OdbcType.NVarChar, 22, "LOC_C_NOMLOCAL");
cmd.Parameters.Add("@nomAbrege", OdbcType.NVarChar, 22, "LOC_C_NOMLOCALABREGE");
daAcc.InsertCommand = cmd;
try
{
daAcc.Update(dsAcc,"Locaux");
Console.WriteLine("Insertion OK");
}
catch(Exception e)
{
Console.WriteLine(e.ToString());
}
Console.WriteLine(dsAcc.GetXml());
Console.WriteLine("C'est fini");
}
finally
{
//6. fermer tout
connAcc.Close();
}
} //ecrireDataDsAccess()
[STAThread]
static void Main()
{
new afficheData();
} //Main
}
}
|
|
|
|