Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, February 22, 2025 
 
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 ThreadView:  Search:  
 Author  Thread: Class Doesn't Support Automation
Matias
Posts: 23
 
Class Doesn't Support AutomationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Class Doesn't Support AutomationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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 AutomationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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


  1. Segment .net components into User controls or function classes.
  2. Try not to pass back DataSets, Tables or anything else that will cause coupling to the platform more then absolutely is required.
  3. Do the bulk of the work in .net (honestly the resuse and capabilities out shine the capabilities inside of the vbscript)
  4. Do not directly bind the saleslogix controls with any .net complex objects (will not work in most cases anyways)
  5. 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 AutomationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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 | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/22/2025 9:49:07 AM