Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, November 22, 2024 
 
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!
 External Development Forums - General External Development
Forum to discuss general external development topic (related or not to SalesLogix development). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General External Development | New ThreadView:  Search:  
 Author  Thread: Extracting Group members without COM?
Mark Hanford
Posts: 131
 
Extracting Group members without COM?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Oct 06 9:44 AM
fiogf49gjkf0d
Hello folks.

I'm writing a simple interface application to extract some data out of SLX into another database. The subset of contacts to be sent are defined by a group in SLX, and not by a specific SQL query. Basically I want a user to be able to modify a filter in SLX to control what gets sent to the other db.

I have managed to get this working using the COM interface so far, but I was wondering if it's possible to get this information using the OLE DB provider only? Essentially, what I need is some way of getting access to the information (or CONTACTID's) from a particular group.

So far I'm using a bit vb.net like:

Dim SLX As New SlxApplication
Dim groupHandle As String = SLX.BasicFunctions.GetGroupIDs("Contact", "Name_Of_My_Group_In_SLX")
Dim groupCount As Integer = SLX.BasicFunctions.GetGroupCount(groupHandle)
For currentContact = 0 To groupCount - 1
contactID = SLX.BasicFunctions.GetGroupValue(groupHandle, currentContact)
Next

From that I can then carry on and use the contactID to do whatever extraction/manipulation I need to.

The problem with this is that SLX needs to be running for it to work, so I either need some way of getting the SlxApplication to log in without user intervention, or use OLE DB only. (The SLX database, username and password are fixed)

Any suggestion would be greatly appreciated

Thanks,

Mark
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Extracting Group members without COM?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Oct 06 4:21 PM
fiogf49gjkf0d
In a round about way, your question has somewhat been answered. It's possible but you have to decode the BLOB DATA section of the group plugin.

Here's another forum post that may shed some light on things: http://www.slxdeveloper.com/forum.aspx?forumid=7000&postid=3945#3945

Ryan may post an example in C# that decodes the report plugin BLOB and a similar technique could be used to extract the info from a group plugin. You could email Duncan Cook from the post and ask him for his group code, as he claims to have figured out how to parse the group BLOB data. I'm in no way suggesting I don't believe him, I just don't have the code to prove it one way or the other.
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Extracting Group members without COM?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Oct 06 6:27 AM
fiogf49gjkf0d
Hmm, that all sounds a little bit out of my depth at the moment. I might just try and work out how to use the COM stuff without requiring an interactive login.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Extracting Group members without COM?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Oct 06 1:08 PM
fiogf49gjkf0d
Completely understandable, it's a bit of a mess when all you want is a column of information. My introduction to the COM interface came from this article: http://www.slxdeveloper.com/page.aspx?id=35&articleid=80 Ryan bypassed the need for authentication by requiring SalesLogix be open before the application would work.

There's another example of how to manipulate the SLXApplication COM interface in the v7 LAN Developer's Reference (on the CD or SupportOnline). I believe the example exists in v6 documentation somewhere, but this is how I found it. I use the Help file and under the SalesLogix OLE DB Provider\Connecting to the SalesLogix Database\The SalesLogix COM Interface, there's a related topic that gives an example in C#. It uses the LogonComplete event because normally when you fire up a new instance of the COM interface, your code wants to execute before SalesLogix can handle it. I would think there would be a way to tap into the login to pass in the admin credentials but I haven't inspected the interface enough to know how to do it.

Good luck, however you decide to pull it off.
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Extracting Group members without COM?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Oct 06 5:14 AM
fiogf49gjkf0d
Thanks for those references, I'll have a look

That one from the manual still seems to need an interactive logon though, it just gives the app time to wait while the user logs in. As this is for a synchronisation tool, I really need this to run non-interactively.

I'll keep you posted
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Extracting Group members without COM?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Oct 06 6:10 AM
fiogf49gjkf0d
Actually, I suppose I should re-post a more specific question about non-interactive connection to COM in the "COM" section of the forum :D
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Extracting Group members without COM?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Dec 06 10:13 AM
fiogf49gjkf0d
You really want to avoid "blob" access as they are subject to change anytime - that is what there is the COM interface, etc.

Point of information on "blobs"... Was doing an upgrade (production cut-over) for a client the past couple of days from 5.2.x to 6.2.5... One of the things we ALWAYS do is to delete from sysdba.USEROPTION on such upgrades since so much changes and every system I've seen has "bad" useroption data (dups, trashed blobs, etc).
After we were done he wanted to "UPDATE UserOption to set everyone's email profile the same. Of course teh first thing I said was.. we NO longer use that table to store UserOption(s)..... and It's "defined" a very diferent way... I reminded him that when I trainied them on (WG) Admin a little while ago that there is an "interface" in ADMIN to do all of this and lock down the user setting.. He still wanted to do it "w/SQL".. my response was.. if you want to.. fine but don't ask me how to do so or how to fix it once it was "trashed" by not using the "correct" method. - He left it alone.. and did it the right way.

What I'm getting at is there are many ways to do things.. but "short cuts" can be very dangerous and unreliable.
--
rjl
[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 © 2024 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): 11/22/2024 2:58:35 PM