简体   繁体   中英

Using HFSQL over ODBC

I want to access windev database from C #.

Through the HFSQL ODBC driver.

static void Main(string[] args)
        {
            try
            {                
                OdbcConnection MyConnection =
                new OdbcConnection(
                "Driver={HFSQL};" +
                "ANA=w:\\C7.wdd;" +
                "Server Name =10.90.6.20;" +
                "Server Port =4900; " +
                "Database =DBASE; " +
                "UID =user; " +
                "PWD =1234;");
                
                MyConnection.Open();
                
                MyData.Close();
                MyConnection.Close();
            }
            catch (OdbcException eExcpt)
            {
                // Display the errors
                Console.WriteLine("Source = " + eExcpt.Source);
                Console.WriteLine("Message = " + eExcpt.Message);
            }
            // pause before exiting
            Console.ReadLine();
        }

MyConnection.Open(); Send this error:

Source =
Message = ERROR [08001] <DvDecEntete> file already defined.
Debugging information:
IEWDHF=32.2
Module=<WDHF>
Version=<26.0.313.5>

All parameter is ok!

What's the problem? And what is the solution?

Thanx

It was solved. The database was in French, using the OLE and ODBC ascii character sets to name the tables. One of the tables had a special French "ê" in its name, and the same table was created with a normal ascii name. The OLE / ODBC interface could not distinguish between the two tables, so there was an error.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM