Question

so, I'm trying to log accesses to my shared files on the network (I'm modifying Abdollah Zawari's ShareMoniter), i do this by starting openfiles.exe like so:

        var process = new Process();
        process.StartInfo.FileName = "openfiles.exe";
        process.StartInfo.Arguments = "/query /FO CSV /v";
        process.StartInfo.UseShellExecute = false;
        process.StartInfo.CreateNoWindow = true;
        process.StartInfo.RedirectStandardOutput = true;
        try
        {
            process.Start();
            if ((process.StandardOutput != null))
            {
                var result = process.StandardOutput.ReadToEnd().Trim().Replace("\"", "");
                var lines = result.Split('\n');...

I want to log the results in an Access database, but jet.Oledb.4.0 or ace.oledb.12.0 only work when I set the project's target platform to x86.

problem is, openfiles.exe doesn't return anything when i run the project for x86 (openfiles.exe starts and ends with no apparent error, but an empty string "" is returned)

I'm very much a newbie, especially in these fields, so any advice on the matter would be greatly appreciated

thanks in advence

Était-ce utile?

La solution

The version of the Oledb you are using does not support 64bit, you need to use a newer version that works on both 32 & 64 bit. Use the Microsoft Access Database Engine 2010 instead to access the database and things will be fine.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top