You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在ASP.NET Core 6 Web API中连接HFSQL数据库并访问数据

HFSQL与ASP.NET Core 6 Web API连接故障

背景

现有HFSQL数据库已和异地WINDEV桌面应用正常连接,计划迁移为基于ASP.NET Core 6 Web API及前端框架的Web应用。通过HFSQL Control Center可正常连接并管理数据库,但Web API项目无法与数据库对接。

尝试方案1:ODBC驱动连接

安装PCSOFT提供的ODBC驱动后,使用如下连接字符串:

"ConnectionStrings": {
  "DefaultConnection": "Driver={HFSQL};Server Name=;Server Port=4900;Database=;UId=;PWD=;"
}

连接失败,报错信息如下:

ERROR [08001] The SQL code defining the <Date_Added> calculated item is incorrect.
Error in the SQL code of the expression.

Unable to load C:\Program Files (x86)\Common Files\PC SOFT\28.0\ODBC\Win64x86\wd280cpl64.dll DLL
Error detected:

WL.DateDuJour()<<<<

System error code: 126
System error message:
The specified module could not be found.

Debugging information:
DLL qui provoque le chargement : WDVM
DLL a charger : wd280cpl64.dll
DLL chargee : C:\Program Files (x86)\Common Files\PC SOFT\28.0\ODBC\Win64x86\wd280cpl64.dll
Chemin des DLL : C:\Program Files (x86)\Common Files\PC SOFT\28.0\ODBC\Win64x86
Chemin de l'EXE :

手动放置该DLL文件后,API应用在连接时无报错直接崩溃。

尝试方案2:OLEDB驱动连接

使用PCSOFT提供的OLEDB驱动,连接字符串如下:

"OLEDBConnect": "Provider=PCSOFT.HFSQL;Data Source=***.***.com:4900;User ID=*****;Password=******;Initial Catalog=*****;"

应用同样崩溃,但该驱动连接其他数据库实例时工作正常。


内容的提问来源于stack exchange,提问作者Dinushe Jayasekera

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 20:10:14