通过 ODBC 使用 HFSQL

发布于 2025-01-15 01:48:23 字数 1239 浏览 2 评论 0原文

我想通过 HFSQL ODBC 驱动程序从 C# 访问 Windev 数据库。

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(); 发送此错误:

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

所有参数都正常!

有什么问题吗?解决办法是什么?

I want to access a 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(); sends this error:

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

All parameters are ok!

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡淡的优雅 2025-01-22 01:48:23

问题解决了。
该数据库是法语的,使用 OLE 和 ODBC ascii 字符集来命名表。其中一个表的名称中有一个特殊的法语“ê”,而同一个表是使用正常的 ascii 名称创建的。 OLE/ODBC接口无法区分这两个表,因此出现错误。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文