ole

Retrieve Outlook logged-in user SMTP address after connecting through OLE

随声附和 提交于 2019-11-27 04:52:57
问题 Exchange Web Services has a ResolveNames() function that I can use to retrieve (among other things) the primary SMTP address for the Active Directory user that logged on to Exchange Server through EWS. I am now programming through OLE against Outlook and would like the same functionality. I have been browsing through the Outlook object model but can't find an appropriate object or method. Does anyone know of an object/method that I can use to get the primary SMTP address? Below is the current

Handling Events for OLEObject CommandButtons created at Runtime

耗尽温柔 提交于 2019-11-27 04:51:00
问题 I have struggled with this problem for while now...I want to do something very simple. I want to create multiple commandbuttons at runtime, and then handle events for these commandbuttons with one procedure. So I have built a "withevents" class to handle the automation, but my code is not working. When I run Test(), the CommandButton is created, but when I click on it...there is no messagebox response...I cannot find the error..Please any help would be great!! Class cTest Public WithEvents

How to insert an image into an Access OLE field via .NET

独自空忆成欢 提交于 2019-11-27 04:01:39
问题 I have an Access .mdb database and I want to insert an image from an application developed in visual C# 2010. Pictures are stored in the database in the field of OLE-object. After adding images directly in Access they are stored in the format of an Bitmap Image. These pictures can be opened in Access with a double-click. I have the following code: OdbcConnection Connection = new OdbcConnection(); ... sql = "INSERT INTO film (poster) VALUES (" ' " + Image.FromFile(textBox8.Text) + " ' ");"; /

Embed files into Excel using Apache POI

天大地大妈咪最大 提交于 2019-11-27 01:59:13
I am exporting data to Excel file using Apache POI. In one weird requirement, I need to embed one file in the Excel using this POI. I have the file, and can be taken into streams or as byte arrays. After googling for much time, I am in a doubt whether POI really supports my requirement. Can we embed files into Excel? :-( Cheers, Anoop Ok, this took very long to finally work out, as there were a few things which didn't look very important at the beginning, but actually corrupted the file when they haven't been set right - especially in the Ole10Native wrapper, part of the unknown2 field

使用sp_addlinkedserver、sp_dropserver 、sp_addlinkedsrvlogin和sp_droplinkedsrvlogin 远程查询数据

时光怂恿深爱的人放手 提交于 2019-11-26 12:35:29
一、sp_addlinkedserver 创建链接服务器。 链接服务器让用户可以对 OLE DB 数据源进行分布式异类查询。 在使用 sp_addlinkedserver 创建链接服务器后,可对该服务器运行分布式查询。 如果链接服务器定义为 SQL Server 实例,则可执行远程存储过程。 1、语法: sp_addlinkedserver [ @server= ] 'server'     [ , [ @srvproduct= ] 'product_name' ]     [ , [ @provider= ] 'provider_name' ]     [ , [ @datasrc= ] 'data_source' ]     [ , [ @location= ] 'location' ]     [ , [ @provstr= ] 'provider_string' ]     [ , [ @catalog= ] 'catalog' ] 2、参数: [ @server = ] ' server ' 要创建的链接服务器的名称。 server 的数据类型为 sysname,无默认值。 [ @srvproduct = ] ' product_name ' 要添加为链接服务器的 OLE DB 数据源的产品名称。 product_name 的数据类型为 nvarchar(128 )

Embed files into Excel using Apache POI

◇◆丶佛笑我妖孽 提交于 2019-11-26 09:51:25
问题 I am exporting data to Excel file using Apache POI. In one weird requirement, I need to embed one file in the Excel using this POI. I have the file, and can be taken into streams or as byte arrays. After googling for much time, I am in a doubt whether POI really supports my requirement. Can we embed files into Excel? :-( Cheers, Anoop 回答1: Ok, this took very long to finally work out, as there were a few things which didn't look very important at the beginning, but actually corrupted the file

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

故事扮演 提交于 2019-11-25 21:52:38
问题 I\'m trying to get data from an Excel file on a button click event. My connection string is: string connString = \"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\\\source\\\\SiteCore65\\\\Individual-Data.xls;Extended Properties=Excel 8.0;\"; When I click on the button, I got the following error: The \'Microsoft.ACE.OLEDB.12.0\' provider is not registered on the local machine. I have no clue how to fix this. My operating system is Windows 7. 回答1: Well, you need to install it. You're looking