请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册

QQ登录

只需一步,快速开始

紫色幽魂

金牌服务用户

723

主题

2513

帖子

8100

积分

金牌服务用户

积分
8100

圣诞拼拼乐微信认证勋章

紫色幽魂
金牌服务用户   /  发表于:2025-4-15 15:40  /   查看:231  /  回复:14
1金币
如题,如何连接本地access数据库


附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册

最佳答案

查看完整内容

问题跟进 您好,这个问题是使用odbc连接access数据库的限制,目前不支持用下方六个操作去做查询 帖子的需求的话,目前有一个绕的方案。改为通配符去查询,查询=CONCAT("%",Container1.Input1,"%")

14 个回复

倒序浏览
最佳答案
最佳答案
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2025-4-15 15:40:43
来自 10#
问题跟进
您好,这个问题是使用odbc连接access数据库的限制,目前不支持用下方六个操作去做查询




帖子的需求的话,目前有一个绕的方案。改为通配符去查询,查询=CONCAT("%",Container1.Input1,"%")

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
stranger
银牌会员   /  发表于:2025-4-15 15:58:50
2#




本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

评分

参与人数 1金币 +5 收起 理由
Lay.Li + 5 赞一个!

查看全部评分

回复 使用道具 举报
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2025-4-15 16:31:21
3#
感谢各位大佬的支持~
正如楼上大佬所述,这里使用odbc去链接即可

1.安装odbc数据源插件,创建数据库连接,选择odbc数据源,然后选择对应的dsn文件就行





2.如果之前没有链接过的话,需要先创建一个dsn。选择使用连接字符串,点击生成

3.点击新建

4.选择mdb后缀的驱动程序

5.随便给dsn起个名,这里用test,然后选择保存路径,这里选择的是下载

6.点击下一页

7.点击完成

8.在自动弹出的页面中设置dns对应的数据库,点击选择

9.选择您的access数据库文件,然后点击确定

10.再点击确定

11.在点击确定,这样dsn就创建好了

12再弹出的页面中,选刚才创建的dsn文件,再点击确定

13.然后就有了链接字符串

14.再点击确定就可以引入access文件里的表了



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
李锦墙
初级会员   /  发表于:2025-4-15 17:02:23
4#
还不如自带数据库,二逼
回复 使用道具 举报
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2025-4-15 17:31:07
5#
感谢各位大佬的支持~
回复 使用道具 举报
紫色幽魂
金牌服务用户   /  发表于:2025-4-16 15:31:11
6#
Lay.Li 发表于 2025-4-15 16:31
感谢各位大佬的支持~
正如楼上大佬所述,这里使用odbc去链接即可

数据导入进来了,表格放在页面后不能进行筛选,是怎么回事儿

  1. Failed to load resource: the server responded with a status of 500 (Internal Server Error)
  2. MetadataLoader.js?v=638785129620000000:833  /Forguncy/Home/GetRowCount
  3. Internal Server Error
  4. Request Exception Happened-------------------------------
  5. Path/Home/GetRowCount
  6. UserName:Administrator
  7. Sql Statement:
  8. [
  9.   {
  10.     "Sql": "select COUNT(*) from `TestNo`  a  Where a.`SaveFileName` LIKE "%20250305%" ESCAPE '/'  ",
  11.     "OriginalSql": "select COUNT(*) from `TestNo`  a  Where a.`SaveFileName` LIKE ? ESCAPE '/' ",
  12.     "SqlParam": {
  13.       "Name": "?",
  14.       "Value": "%20250305%"
  15.     },
  16.     "Duration": "5.5108ms"
  17.   }
  18. ]
  19. {
  20.   "IsTransient": false,
  21.   "SqlState": null,
  22.   "BatchCommand": null,
  23.   "ErrorCode": -2147467259,
  24.   "Message": "ERROR [42000] [Microsoft][ODBC Microsoft Access Driver] 语法错误 (操作符丢失) 在查询表达式 'a.`SaveFileName` LIKE Pa_RaM000 ESCAPE '/'' 中。 ",
  25.   "Data": {
  26.     "$type": "System.Collections.ListDictionaryInternal, System.Private.CoreLib"
  27.   },
  28.   "InnerException": null,
  29.   "HelpLink": null,
  30.   "Source": "GrapeCity.Forguncy.DataBaseApi",
  31.   "HResult": -2147467259,
  32.   "StackTrace": "   at GrapeCity.Forguncy.DataBaseApi.DataWrapperBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
  33.    at GrapeCity.Forguncy.DataBaseApi.DataWrapperBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
  34.    at Forguncy.DataSourceBase.FillTableAsync(String commandText, IEnumerable`1 parameters)
  35.    at ForguncyDataAccess.DataAccess.SelectFromDatabaseAsync(String connectionString, String selectString, String databaseType, DbParameter[] parameters, ISqlSettings sqlSettings)
  36.    at ForguncyDataAccess.DataAccess.GetDataTableRowCountWithSqlSettingsAsync(ISqlSettings sqlSettings, String tableName, List`1 columnBindingInfos, ISqlCondition sqlCondition)
  37.    at Forguncy.Server2.ForguncyServerDataAccess.GetDataTableRowCountWithSqlSettingsAsync(ISqlSettings sqlSettings, String tableName, List`1 columnBindingInfos, ISqlCondition sqlCondition)
  38.    at Forguncy.Server2.ForguncyServerDataAccess.GetDataTableRowCountAsync(String tableName, List`1 columnBindingInfos, ISqlCondition sqlCondition)
  39.    at Forguncy.Server2.Controllers.HomeController.GetRowCountAsync(GetRowCountParam data)
  40.    at Forguncy.Server2.Controllers.HomeController.GetRowCountAsync(GetRowCountParam data)
  41.    at lambda_method532(Closure, Object)
  42.    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
  43.    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
  44.    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  45.    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
  46.    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
  47.    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  48.    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  49.    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
  50.    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
  51.    at ServerDesignerCommon.CodeEditor.CodeEditorMiddleware.DoInvokeAsync(HttpContext context)
  52.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  53.    at Forguncy.Server2.KatanaMiddleware.JavaAdapterReflectMiddleWare.DoInvokeAsync(HttpContext context)
  54.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  55.    at Forguncy.Server2.KatanaMiddleware.ProcessEngineMiddleware.DoInvokeAsync(HttpContext context)
  56.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  57.    at Forguncy.Server2.KatanaMiddleware.ReportsMiddleware.DoInvokeAsync(HttpContext context, ICacheService cacheService, IReportServerService reportServerService)
  58.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase`2.InvokeAsync(HttpContext context, TService1 service1, TService2 service2)
  59.    at Forguncy.KatanaMiddleware.ServerCommandMiddleware.DoInvokeAsync(HttpContext context)
  60.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  61.    at Forguncy.Server2.KatanaMiddleware.AppServiceMiddleware.DoInvokeAsync(HttpContext context)
  62.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  63.    at ak.DoInvokeAsync(HttpContext a)
  64.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  65.    at aj.DoInvokeAsync(HttpContext a)
  66.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  67.    at Forguncy.Server2.KatanaMiddleware.StartPageMiddleware.DoInvokeAsync(HttpContext context)
  68.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  69.    at Forguncy.Server2.KatanaMiddleware.ResourceMiddleware.DoInvokeAsync(HttpContext context)
  70.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  71.    at ForguncyServerCommon.HttpHeaderMiddlewareBase.DoInvokeAsync(HttpContext context)
  72.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  73.    at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
  74.    at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
  75.    at ForguncyServerCommon.HttpResponseHeaderMiddlewareBase.DoInvokeAsync(HttpContext context)
  76.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  77.    at Forguncy.Server2.KatanaMiddleware.IpRestrictionMiddleware.DoInvokeAsync(HttpContext httpContext)
  78.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  79.    at Forguncy.Server2.KatanaMiddleware.RecordProxyHeaderInfoMiddleware.DoInvokeAsync(HttpContext httpContext)
  80.    at Forguncy.Log.Logger.Component.LoggingMiddlewareBase.InvokeAsync(HttpContext context)
  81.    at aq.DoInvokeAsync(HttpContext a)"
  82. }
复制代码


回复 使用道具 举报
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2025-4-16 16:39:09
7#
您好,您说的筛选是列头筛选么,这里引入access数据库,用列头筛选是没有保存的。可以上传下您的access文件和工程文件,我们测试一下看看么?


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
紫色幽魂
金牌服务用户   /  发表于:2025-4-16 17:15:05
8#
Lay.Li 发表于 2025-4-16 16:39
您好,您说的筛选是列头筛选么,这里引入access数据库,用列头筛选是没有保存的。可以上传下您的access文件 ...


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2025-4-16 17:35:36
9#
本帖最后由 Lay.Li 于 2025-4-17 13:42 编辑

大佬,这边儿复现了,调查一下哈,有问题及时给您反馈~

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
12下一页
您需要登录后才可以回帖 登录 | 立即注册
返回顶部