Problem with creating files under the window path

Can anyone help me on how to generate it with hdfql under windows. h5 file I run the code below generated below the specified directory. h5 file failed?

    private void BtnCreateHDF5_Click(object sender, RoutedEventArgs e)
        Stopwatch sw = Stopwatch.StartNew();


        string pathname = "";
        string dbname = "F:\\test1\\hdf5_data.h5";

        ushort[,,] values = new ushort[1, 200, 800];
        //HDFql.Execute("USE DIRECTORY " + pathname);
        HDFql.Execute("CREATE FILE " + dbname);
        HDFql.Execute("USE FILE " + dbname);

        HDFql.Execute("CREATE GROUP /Data/GR-1 ORDER TRACKED");
        HDFql.Execute("CREATE CHUNKED(1,200, 800) DATASET /Data/GR-1/MyData " +

        Random random = new Random();

        for (int i = 0; i < 200; i++)
            for (int j = 0; j < 800; j++)
                values[0, i, j] = (ushort)(random.Next(60000));

        HDFql.Execute("INSERT INTO /Data/GR-1/MyData VALUES FROM MEMORY "
            + HDFql.VariableTransientRegister(values));
        HDFql.Execute("CLOSE FILE");

        TimeSpan ts = sw.Elapsed;
        string ss = "HDF5 Insert Data 10000:  " + ts.TotalSeconds.ToString("0.0000");



Hi @meng_1226,

Would you mind surrounding dbname with double-quotes as it contains special characters (e.g. :). In other words (and simplifying your code):

HDFql.Execute("CREATE AND USE FILE \"" + dbname + "\"");

Hope it helps!

        string dbname = "\"F:\\test1\\hdf5_data.h5\"";
        //HDFql.Execute("USE DIRECTORY " + pathname);
        HDFql.Execute("CREATE FILE " + dbname);
        HDFql.Execute("USE FILE " + dbname);

To still create the F:\test1\hdf5_data.h5 file has failed,
HDFql. Execute Execution is returned as fail

Hi @meng_1226,

Do you have access to F:\\test1? Also, would you mind to share the return code of Execute as follows:

Console.WriteLine(HDFql.Execute("CREATE FILE " + dbname));

Uploading: ret.png…
return = -4

Thanks for sharing the return code.

According to HDFql reference manual, return code -4 (HDFQL_ERROR_NO_ACCESS) means that a directory, file or object cannot be accessed.

Are you sure to have access to F:\\test1?

maybe windows path problem, HDFql using posix!

Would you mind trying string dbname = "\"F:\\\\test1\\hdf5_data.h5\""; or string dbname = @“”"F:\\test1\\hdf5_data.h5\"”"; and see how it goes?

Thanks so much for your reply, but still not

Would you mind checking if you have access to F:\\test1?

The test program I wrote is available in D:\projects\hdftest1,
If I use this
string dbname = “hdf5_data.h5”;
He can generate a file under the directory of the program, but not if he changes the disk character

F: \test1 This directory can be accessed

Is it a problem with the posix style path???

Who can help me to be appreciated!!