11-18-2010 03:15 PM - edited 11-18-2010 03:37 PM
is there any restrictions to building plugins that use OLEDB?? can the code be used in standard act and premium versions?
my problem is that i get this error when trying to use OLEDB to do something simple in ACT2011
"The SELECT permission was denied on the object 'TBL_CONTACT', database 'ACT2011Demo', schema 'dbo'."
Dim adapter As OleDb.OleDbDataAdapter Dim Connection As OleDb.OleDbConnection Dim searchResults As DataSet = New DataSet Connection = New OleDb.OleDbConnection(ActApplication.Instance.ActFramework.CurrentACTOLEDB) Connection.Open() adapter = New OleDb.OleDbDataAdapter("SELECT FIRSTNAME FROM TBL_CONTACT", Connection) '<-- tried dbo.TBL_CONTACTS adapter.Fill(searchResults) '<-- errors here when filling Connection.Close()
i tried replacing the select command with SELECT * FROM VRP_CONTACT but i then get the error
"There is insufficient system memory in resource pool 'internal' to run this query."
I just want to be able to run SQL statements to pull results from the DB
11-18-2010 03:57 PM
Sage need to put some effort into BETTER documentation.. even the demo 'source code' for ACT 2011 uses obsolete depreciated objects in the samples
but i have worked out that OLEDB2 i can use "SELECT * FROM CONTACT" to get results.. it just doesnt like FULL SQL SYNTAX
11-18-2010 10:52 PM
There's a range of samples in the devnet download forums meant to show applicability across several versions. It is often beneficial to show how to use methods that are obsolete in newer versions as ACT! enjoys forward compatibility, so this code works across a range of versions.
I'm not sure what you mean by Full SQL syntax - there are a range of different SQL constructs not all of which are supported by our underlying RDBMS provider. If you are referring to T-SQL, almost no supplementary provider supports full T-SQL syntax, it's often impractical and overly resource intensive. The OLEDB providers generally attempt to support ANSI 92 SQL syntax, using this syntax you can accomplish at least 85%+ of any data construction you'd need to via the provider.
If you have a specific example or suggestion for improving documentation or devnet items I'd like to hear it, there are examples specifically for the OLEDB2 provider on the devnet downloads site - if these were insufficient what would have worked better?
11-18-2010 11:20 PM
by full SQL im refering to one minute using MutableEntityFieldDescriptor using fully qualified naming "TBL_CONTACT.FIELDNAME" noting that the contact table is called TBL_CONTACT, just like company is TBL_COMPANY.. yet the next minute using OLEDB i drop the TBL_
just frustration of spending sooo much time trying to work out something simple