问题描述
想知道这里是否有人可以提供帮助.我被要求开发一个ASP.Net应用程序,它将直接连接(存储和检索)到ACT!数据库已经起作用.我是ACT的新手,正在寻找将其与ASP.Net应用程序集成的起点.我特别在寻找以下问题的答案:1. ACT使用哪种数据库技术?是SQL Server吗?在那种情况下,我应该能够像任何SQL Server数据库一样进行连接?2.是否有来自ACT的.Net类库或API,将有助于实现这一目标?3.任何有助于实现此功能的代码示例或文章都将有很大的帮助.期待得到答复.非常感谢,阿里
Wondering if someone here can help. I have been asked to develop an ASP.Net application which will directly connect (store and retrieve) to the ACT! databse already functional. I am new to ACT and looking for a starting point to integrate it with ASP.Net application. In particular I am looking for answers to the following questions:1. What database technology is used by ACT? Is SQL Server? In that case, I should be able to connect just like any SQL Server database?2. Is there any class library or API for .Net from ACT which will help achieve this?3. Any code example or articles to help implement this will be of great help.Looking forward to responses. Many thanks,Ali
推荐答案
我意识到这个问题已经很老了,但我发布此问题是为了让任何被迫处理ACT框架的可怜人受益.
I realize this question is pretty old, but I'm posting this for the benefit of any poor souls forced to deal with the ACT Framework.
1: ACT使用了哪种数据库技术?
SQL Server(Express或Standard,取决于用户的版本和数量).
1:What database technology is used by ACT?
SQL Server (Express or Standard, depending on version & # of users).
是SQL Server吗?在那种情况下,我应该能够像任何SQL Server数据库一样进行连接?
Is SQL Server? In that case, I should be able to connect just like any SQL Server database?
不一定. ACTReader实用程序(ACT!附带)将使您创建一个只读SQL用户帐户来直接使用ACT! SQL Server数据库. 您也许可以强行进入,但这可能会使您可能获得的任何支持无效如果有问题,请先贤.考虑到数据库列名称和接口字段名称之间的大量连接和时髦的区别,即使您具有sa访问权限,也不是一个好主意.
Not necessarily. The ACTReader utility (comes with ACT!) will let you create a read only SQL user account to directly your ACT! SQL Server database. You may be able to force your way in but this would probably void any support you might have had from Sage if something goes wrong. Given the heavy joining and funky differences between database column names and interface field names, it might not be a good idea even if you did have sa access.
2: 是否有来自ACT的.Net类库或API来帮助实现这一目标?
那里可能存在预先编写的包装器类,以简化ACT api.考虑到ACT,我怀疑他们是免费的!帮助留言板似乎主要是为了使ACT受益! 顾问"寻找新客户...另外,您可以从ACT!下载"SDK",但是作为示例,它几乎是无用的,因此,使用.NET ACT所需的所有dll文件都非常清楚!在安装ACT时即会安装api!
2: Is there any class library or API for .Net from ACT which will help achieve this?
There might be prewritten wrapper classes out there to simplify the ACT api. I doubt they're free, considering the ACT! help message boards appear to exist mostly for the benefit of ACT! "consultants" to find new clients...Also, you can download the "SDK" from ACT!, but its mostly useless as the examples arent very clear and all the dll files you need to use the .NET ACT! api are installed when you install ACT!
3: 任何有助于实现此功能的代码示例或文章都会有很大帮助
3: Any code example or articles to help implement this will be of great help
我不得不通过几十篇板子文章来学习,但最终我设法编写了一个 C#导入实用程序,以从我的PHP/MySQL网络服务器上获取网站联系人(对不起)任何ASP.NET东西).这是一个精简的示例,仅显示将联系人插入ACT!所需的基础知识:
I had to learn by bits and pieces of dozens of board postings, but I finally managed to write an C# import utility to grab website contacts from my PHP/MySQL webserver (sorry haven't done any ASP.NET stuff yet). Here is an distilled down example showing just the basics you need to insert a contact into ACT!:
免责声明:这是ACT 2012的版本,如果以前的版本或将来的版本将以相同的方式工作,则不知道
首先:ACT! 2010年2012使用.NET 3.5,因此请确保将项目设置为此类.另外,您可能必须在Visual Studio项目中指定x86目标CPU.如果设置不正确,将抛出VersionMismatchError
First: ACT! 2010 & 2012 uses .NET 3.5, so Make sure to set your project as such. Also you may have to specify x86 target CPU in your Visual Studio project. Failure to have the correct settings will throw a VersionMismatchError
您需要包括ACT .dll的引用,这些引用位于Global Assembly Cache文件夹中(假设您在该计算机上安装了ACT).
you need to include references the ACT .dlls, which are in the Global Assembly Cache folders (assuming you have ACT installed on that machine).
要仅导入地址,您需要以下GAC .dll:
For just importing an address, you need the following GAC .dlls:
Act.Framework
Act.Shared.Collections
示例程序:
using System;
//etc...
using Act.Framework;
using Act.Framework.Contacts;
namespace ImportToACT
{
class Program
{
static void Main(string[] args)
{
ActFramework ACTFM = new ActFramework();
ACTFM.LogOn(("\\\\Path\\To\\Your\\padfile.pad"), "Username","Password");
Contact newContact = ACTFM.Contacts.CreateContact();
newContact.Company = "Springfield Nuclear Power Plant";
newContact.FullName = "Homer J Simpson";
newContact.ContactFields["Contact.Address 1", false] = "742 Evergreen Terrace";
newContact.ContactFields["Contact.City", false] = "Springfield";
newContact.ContactFields["Contact.State", false] = "OR";
newContact.ContactFields["Contact.Country", false] = "United States";
newContact.ContactFields["Contact.Zip", false] = "90701";
newContact.ContactFields["Contact.Phone", false] = "(939) 555-0113";
newContact.ContactFields["Contact.E-mail", false] = "[email protected]";
newContact.Update();
ACTFM.LogOff();
return;
}
}
}
根据我的收集,ContactFields bool 2nd isReal值确定您是引用的是真实数据库列(true)还是act接口中的字段名称(false),这并不总是与包含字段数据的列名称相对应.我在使用真实的数据库列名称时遇到了问题,因此我只使用了字段名称路由.
From what I can gather, the ContactFields bool 2nd isReal value determines if you are referencing a real database column (true) or a field name in the act interface (false), which doesnt always correspond to the column name holding field data. I had issues with using the true database column name so I just went the field name route.
此外,您还会注意到Contact对象还有一些其他属性,例如FirstName和LastName,但这些属性是只读的.由于某些原因,ACT!希望您输入FullName并让其解析名字,中间名和姓氏.
Also you will notice that the Contact object has some other properties like FirstName and LastName, but these are read only. For some reason ACT! wants you to enter the FullName and let it parse first, middle and last names.
祝你好运!
这篇关于与asp.net的sage集成进行ACT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!