我们可以在天蓝色函数中使用Microsoft.ACE.OLEDB.12吗? [英] Can we use Microsoft.ACE.OLEDB.12 in azure functions?

查看:142
本文介绍了我们可以在天蓝色函数中使用Microsoft.ACE.OLEDB.12吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想使用oledb连接从sql数据库中将数据插入excel文件,因此我编写了以下代码,但在Microsoft.ACE.OLEDB.12中出错.可以在天蓝色使用oledb吗?如果可以的话,我们该如何实施?

I want to insert the data to excel file from the sql data base using oledb connection, So i have wrote the below code but getting error in Microsoft.ACE.OLEDB.12. can we use oledb in azure? if so how can we implement?

错误: 执行功能时发生异常:Functions.TimerTriggerCSharp1. Microsoft.Azure.WebJobs.Script:发生一个或多个错误. System.Data:Microsoft.ACE.OLEDB.12.0"提供程序未在本地计算机上注册.

ERROR : Exception while executing function: Functions.TimerTriggerCSharp1. Microsoft.Azure.WebJobs.Script: One or more errors occurred. System.Data: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

感谢,Kaviya Balasubramanian | Microsoft MVP-Office服务器和服务(请记住在有助于您的帖子上单击标记为答案")

Thanks, Kaviya Balasubramanian | Microsoft MVP - Office Servers and Services (Please remember to click "Mark as Answer" on the post that helps you)

推荐答案

错误本身是很自我解释的.默认情况下,该软件包未安装在系统上.这意味着,如果要使用它,则需要在代码中明确声明.例如: 

The error itself is fairly self explanatory. That package is not installed on the system by default. Which means if you want to use it you will need to explicitly say so in your code. For example: 

https://docs.microsoft.com /en-us/azure/azure-functions/functions-reference-csharp#multiple-attribute-example

Microsoft.WindowsAzure.Storage.Queue;

using Microsoft.WindowsAzure.Storage.Queue;

在搜索时,我没有找到任何与OLEDB相关的软件包.我确实找到了您的Stack Overflow帖子,但是有人看到它提到了2007 Office system驱动程序:数据连接组件

I am not finding any packages referring to OLEDB when searching. I did find your Stack Overflow post however which I see someone mentions 2007 Office System Driver: Data Connectivity Components

> https://stackoverflow.com/questions/34948565/oledb-provider -azure服务器上的连接问题

我搜索了与此相关的任何内容,并发现了一些项目:

I did a search for anything related to that and found a few items: 

https://www.nuget.org/packages ?q = 2007 + Office + System + Driver%3A + Data + Connectivity + Components

您可以考虑尝试上述链接中列出的一种,以查看是否有帮助.

You might consider trying one of the ones listed in the above link to see if it helps. 



这篇关于我们可以在天蓝色函数中使用Microsoft.ACE.OLEDB.12吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆