通过 ODBC 使用 HFSQL
我想通过 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了。
该数据库是法语的,使用 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.