Home
|
Forums
|
Contact
|
Search
|
Syndication
[login]
[create account]
Friday, February 21, 2025
slxdeveloper.com
Home
Search
Contact us
About slxdeveloper
Syndication
Community
Forums
(NEW!)
Newsletter Archive
Members
Your Profile
Submit Article
General
Administration
(6)
OLE DB Provider
Miscellaneous
(2)
Architect
VBScript
(9)
ActiveX Controls
(6)
How To's
(14)
.NET Extensions
(3)
External
OLE DB Provider
(12)
SLAPI (SlgxApi.dll)
SalesLogix COM
(1)
Web
ASP/ASP.NET
(2)
Web Services
Web Client
Downloads
Samples
(17)
Documentation
(7)
Utilities
(18)
Resources
SalesLogix
(3)
Programming
(1)
2/21/2025 10:58:49 PM
slxdeveloper.com Community Forums
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the
code of conduct
for posting guidelines.
Forums RSS Feed
Back to Forum List
|
Back to SalesLogix .NET Extensions
|
New Thread
View:
Dynamic
Flat
Tree
Search:
Author
Thread: Class Doesn't Support Automation
Matias
Posts: 23
Class Doesn't Support Automation
Posted: 25 Feb 08 8:05 AM
Hi, everyone.
I'm running wit a little problem here.
I have a Function on .Net that returns a DataTable, and what i want to do is to assign that DT to a DataGrid in SLX.
Here is the code:
Public Function GetContactForAccount(ByVal Acct As Object) As Object
SetConnection()
sSQL = "SELECT * FROM CONTACT WHERE ACCOUNTID = '" & Acct.AccountID & "'"
ContactDA = New OleDbDataAdapter(sSQL, oConnection)
ContactDT = New DataTable
ContactDA.Fill(ContactDT)
Return ContactDT
End Function
[
Reply
][
Quote
]
Ryan Farley
Posts: 2265
Re: Class Doesn't Support Automation
Posted: 25 Feb 08 12:54 PM
I don't see anywhere in the code where you are declaring the ContactDA and ContactDT.
However, aside from that, I can't imaging this would work at all. I would expect that the SLX datagrid control would not have the slighest idea what to do with a .NET DataSet.
[
Reply
][
Quote
]
Mark Dykun
Posts: 297
Re: Class Doesn't Support Automation
Posted: 26 Feb 08 7:57 AM
I agree with Ryan. The DataSet is not a com object persay. I think the point of using .net extensions are being missed here. Specifically for the most part you can play in a Sand Box. If you want to show a datasets records on a grid, create a .net user control and host it in the form. I think from an architectural standpoint you should Keep as much of the .net plumbing out of SalesLogix. Passing in a Recordset from SLX or passing back a Datatable is very high cohesion and not recommended in my opinion.
My thoughts
Segment .net components into User controls or function classes.
Try not to pass back DataSets, Tables or anything else that will cause coupling to the platform more then absolutely is required.
Do the bulk of the work in .net (honestly the resuse and capabilities out shine the capabilities inside of the vbscript)
Do not directly bind the saleslogix controls with any .net complex objects (will not work in most cases anyways)
Avoid replicating code that can be done in SLX in the .net code. Honestly it is not the best code to move directly into .net in the first place. Look for the right ways to implement using the framework libraries and not try to reuse hacks and kludges that had to be written in VBScript to get things to work
Mark
[
Reply
][
Quote
]
Mark Dykun
Posts: 297
Re: Class Doesn't Support Automation
Posted: 26 Feb 08 8:00 AM
Looks like Class level variables from the code snippet. Not a great thing for the GC though.
Mark
[
Reply
][
Quote
]
Page 1 of 1
You can subscribe to receive a daily forum digest in your
user profile
. View the site
code of conduct
for posting guidelines.
Forum RSS Feed
-
Subscribe to the forum RSS feed to keep on top of the latest forum activity!
slxdeveloper.com is brought to you courtesy of
Ryan Farley
&
Customer FX Corporation
.
This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.
code of conduct
|
page cache (param): 2/21/2025 11:46:19 PM