12/13/2025 11:40:28 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!
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
|
|
|
|
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 |
|
|
|
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. |
|
|
|
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 |
|
|
| |
|
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!
|
|
|
|
|
|
|
|