Home > Blockchain >  Using HFSQL over ODBC
Using HFSQL over ODBC

Time:03-21

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

CodePudding user response:

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.

  • Related