ADODB记录集和连接 [英] ADODB recordsets and connections

查看:49
本文介绍了ADODB记录集和连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 -


我刚开始学习ADO,我目前的项目有一个目的似乎是使用ADODB记录集。设置是这样的。


我有一个表 tblScreenShot ,它有三个字段: fldTicketNum,fldScreenShotDescription, fldScreenShot 的。基本上,该表将做的是存储屏幕截图(fldScreenShot是键入的OLE对象)。在我的项目中,每20个记录中就有1个需要一个屏幕截图...所以这个表格是我想要存储的地方。


由于屏幕截图占用了大量内存,我定期想要从数据库中清除它们并将它们放在一个单独的文件中。然后,每当用户需要拉出包含屏幕截图的记录时 - 这不会经常发生,数据库可以打开文件并将其拉出。


所以,我的第一个在黑暗中拍摄试图将表的内容保存到文件中的尝试如下:

展开 | 选择 | Wrap | 行号

解决方案

只是一个想法....


链接到屏幕截图比嵌入它们要好得多。数据库中没有多少空间。我在这里有一个申请(我在一家保险公司工作),它链接到成千上万的MS Word文件(法规,法律,规则,表格等)。当我们得到一个新的doument时,它被放在我们的文件服务器上。然后,用户将文档的链接添加到我们的数据库。我们还有几个信息领域描述了允许用户搜索文档的文档(类型,状态,描述,有效日期等)。


我也有一个功能这允许每个用户将文档记录保存到/从他们的收藏夹中删除/删除文档记录。名单。我们的一些人经常只选择几种形式。


当你导出带有嵌入式OLE对象的记录时,我认为你丢失了这些对象 - 不确定这个对象。


只是一个想法......


链接屏幕截图要好得多嵌入他们。数据库中没有多少空间。我在这里有一个申请(我在一家保险公司工作),它链接到成千上万的MS Word文件(法规,法律,规则,表格等)。当我们得到一个新的doument时,它被放在我们的文件服务器上。然后,用户将文档的链接添加到我们的数据库。我们还有几个信息领域描述了允许用户搜索文档的文档(类型,状态,描述,有效日期等)。


我也有一个功能这允许每个用户将文档记录保存到/从他们的收藏夹中删除/删除文档记录。名单。我们的一些人经常只选择少数几种形式。


当你导出带有嵌入式OLE对象的记录时,我认为你丢失了这些对象 - 不确定这个对象。



最初,使用链接是我想要做的。问题是只有在应用程序(基于Web的工资单/计时应用程序)遇到某种运行时错误并引发可能的神秘错误消息框时才需要截屏。


应用程序管理员希望记录在引发错误时屏幕的确切内容。通过在该点获取应用程序窗口(Internet Explorer窗口)的屏幕截图,然后将其粘贴到Access窗口中的OLE框中,我理论上可以将每个屏幕保留在数据库中。因此,简单地链接到文档并不是一个真正的问题。


就像你说的那样,每个屏幕截图都占用了大量的内存(到目前为止我已尝试过5 MB或更多),所以我想要至少要定期将它们清除到一个单独的文件中,以免压低数据库本身...



Hi -


我刚开始学习ADO,我目前的项目有一个目的似乎是使用ADODB记录集。设置是这样的。


我有一个表 tblScreenShot ,它有三个字段: fldTicketNum,fldScreenShotDescription, fldScreenShot 的。基本上,该表将做的是存储屏幕截图(fldScreenShot是键入的OLE对象)。在我的项目中,每20个记录中就有1个需要一个屏幕截图...所以这个表格是我想要存储的地方。


由于屏幕截图占用了大量内存,我定期想要从数据库中清除它们并将它们放在一个单独的文件中。然后,每当用户需要拉出包含屏幕截图的记录时 - 这不会经常发生,数据库可以打开文件并将其拉出。


所以,我的第一个在黑暗中拍摄试图将表的内容保存到文件中的尝试如下:

展开 | 选择 | Wrap | 行号


Hi -

I am just starting my study of ADO, and I have a purpose in my current project which seems to lend itself to using an ADODB recordset. The set up is this.

I have a table tblScreenShot that has three fields: fldTicketNum, fldScreenShotDescription, and fldScreenShot. Basically, what this table will do is store screen shots (fldScreenShot is typed "OLE Object"). Perhaps 1 in 20 records in my project will necessitate a screen shot...so this table is where I want to store them.

Since screen shots take up so much memory, periodically I want to purge them from the database and put them in a separate file. Then, whenever the user needs to pull a record containing a screen shot - which won''t be too often, the database can open the file back up and pull it out.

So, my first "shot in the dark" attempt at trying to save the contents of the table to a file goes something like this:

Expand|Select|Wrap|Line Numbers

解决方案

Just a thought....

It would be far better to link to the screenshots than embed them. Nowhere near as much space taken in database. I have an application here (I work for an insurance company) that links to thousands of MS Word documents (regulations, laws, rules, forms, etc.). When we get a new doument it is put on our file server. A user then adds the a link to the document to our database. We also have several fields of information that describe the document (type, state, descrip, valid dates, etc) that allows the user to search for a document.

I also have a function which allows each user to save/remove a document record to/from their "Favorites" list. Some of our people work constantly with only a select few forms.

When you export records with embedded OLE objects, I think you lose the objects - not sure on this one.


Just a thought....

It would be far better to link to the screenshots than embed them. Nowhere near as much space taken in database. I have an application here (I work for an insurance company) that links to thousands of MS Word documents (regulations, laws, rules, forms, etc.). When we get a new doument it is put on our file server. A user then adds the a link to the document to our database. We also have several fields of information that describe the document (type, state, descrip, valid dates, etc) that allows the user to search for a document.

I also have a function which allows each user to save/remove a document record to/from their "Favorites" list. Some of our people work constantly with only a select few forms.

When you export records with embedded OLE objects, I think you lose the objects - not sure on this one.

Initially, using links was what I wanted to do. The problem is that screenshots will only be needed when the application (a web-based payroll/timekeeping application) encounters some sort of run-time error and raises possibly cryptic error message boxes.

The application administrators want to have a record of exactly what the screen looks like at the point where the error is raised. By taking a screen shot of the application''s window (an Internet Explorer window) at that point and then pasting it into an OLE box back in the Access window, I can in theory keep each screen shot in the database. So it''s not really a question of simply linking to a document.

It''s like you say though, each screen shot takes up so much memory (5 MB or more for the ones I''ve tried so far), so I want to at least purge them to some separate file periodically, so as not to weigh down the database itself...


Hi -

I am just starting my study of ADO, and I have a purpose in my current project which seems to lend itself to using an ADODB recordset. The set up is this.

I have a table tblScreenShot that has three fields: fldTicketNum, fldScreenShotDescription, and fldScreenShot. Basically, what this table will do is store screen shots (fldScreenShot is typed "OLE Object"). Perhaps 1 in 20 records in my project will necessitate a screen shot...so this table is where I want to store them.

Since screen shots take up so much memory, periodically I want to purge them from the database and put them in a separate file. Then, whenever the user needs to pull a record containing a screen shot - which won''t be too often, the database can open the file back up and pull it out.

So, my first "shot in the dark" attempt at trying to save the contents of the table to a file goes something like this:

Expand|Select|Wrap|Line Numbers


这篇关于ADODB记录集和连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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