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!
|
|
Not able to use SLXAPI in .net
Posted: 23 Aug 07 3:05 PM
|
Hi, I am new to SalesLogix development. We have tool in VB6 Which uses SLXAPI for data manipulations. We are migrating this into .net and I need to use this SLXAPI for creating Unique IDs. Is there .NET SLXAPI DLL availble or How to implement this. Please help me.
Thanks Raj |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 24 Aug 07 12:18 AM
|
SLAPI is not used any more.. and no there is not a .NET SLAPI...
Ryan has examples on this site of using .NET w/ SalesLogix.
-- rjl |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 24 Aug 07 8:57 AM
|
Is this SlxManagedLib? I am trying to execute that application. I am getting error when logging into Sales Logix. |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 24 Aug 07 9:09 AM
|
When I execute the application of SlxApi.Vb of SlxManagedLib solution (Provided by Ryan) , Its logging into Sales Logix. But when I copy attach this module to different appication and trying to logon , I am getting the following error.
Unable to find an entry point named 'slapi_LogInto' in DLL 'SlgxApi.dll'.
Thanks |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 24 Aug 07 3:37 PM
|
1) What version of SLX are you on?
2) Stop using SLAPI
3) SLAPI should still work, but I've not tested SLAPI with SLX for a couple years, so who knows. One thing you'd have to do for sure, the SLAPI DLL (SlgxApi.dll) is not found in the path. You'll have to either add the SLX dir to the PATH environment variable, or copy the file to the System32 directory.
4) SLAPI is junk, you really shouldn't be using it any more. I realize that this is easier said than done when you have a production application using it and no time to rewrite it. But, give it some thought.
-Ryan |
|
|
| |
| |
|
Re: Not able to use SLXAPI in .net
Posted: 27 Aug 07 1:12 PM
|
Originally posted by Raj
Can I use this wrapper instead of Slapi? We are upgrading our sales logix version from 5.2 to 7. |
|
It's not *instead of*. The wrapper simply wraps the SLAPI DLL to provide a managed wrapper to call it from .NET. Whether SLAPI works or not anymore, no idea. If SLAPI is still supported the wrapper should work fine. |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 27 Aug 07 3:02 PM
|
I am sorry I didn't get this. In our application we are using SLAPI to generate unique iDS for each table. Since there won't be SLAPI in the future, Can I use this wrapper to generate IDs. To generate we need to log on to SALESLGIX. Does this wrapper LogOn functions work for future versions of SALES LOGIX 7.x? |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 27 Aug 07 3:35 PM
|
Instead of using SLAPI, with SalesLogix version 6.0 and higher, you can use the OLEDB providor and access SalesLogix through ADO or ADO.NET. To create Ids, you would do something like this
Public Function CreateSLXId(ByVal szTable As String) As String Dim conSLX As New OleDbConnection(szgSLXStr) Dim szSql As String
' Create New Id conSLX.Open() ' Use OLEDB Provider stored procedure "SLX_DBIDs" szSql = "SLX_DBIDs('" & szTable & "', 1)" Dim cmdIDs As New OleDbCommand(szSql, conSLX) Dim rdrIDs As OleDbDataReader rdrIDs = cmdIDs.ExecuteReader(CommandBehavior.Default) rdrIDs.Read() CreateSLXId = rdrIDs.GetValue(0) rdrIDs.Close() cmdIDs.Dispose() conSLX.Close() End Function
szgSLXStr is a variable that should contain your ADO connection string.
Ryan has a great article on this site that talks about using ADO with SalesLogix. See here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=17
Lloy |
|
|
| |
|
Re: Not able to use SLXAPI in .net
Posted: 28 Aug 07 8:53 AM
|
Lloy , i initially coded things that way.After a while things started failing on the create dbids proc and i was told that i needed to know the real "internals" of slx... So i had to code it this way
Function CreateSLXIDFor(ByVal sTableName As String) As String Dim oRecordSet As Object Dim oConnection As Object Dim oCommand As Object Dim oParameter As Object Dim sCommandText As String Dim sEntityAlias As String sEntityAlias = sTableName Select Case UCase(sTableName) Case "ATTACHMENT" sEntityAlias = "FILEATTACH" Case "USERNOTIFICATION" sEntityAlias = "USERNOTIFY" Case "AGENTS" sEntityAlias = "HOSTTASK" Case "RESOURCELIST" sEntityAlias = "RESOURCE" Case "USEROPTION" sEntityAlias = "USERVIEW" Case "JOINDATA" sEntityAlias = "JOIN" Case "PROCEDURES" sEntityAlias = "PROCEDURE" Case "SEC_FUNCTIONOWNER" sEntityAlias = "FUNCTIONHANDLER" End Select sCommandText = "slx_dbids ( '" & UCase(sEntityAlias) & "' , 1) " oConnection = GetNewConnection() oCommand = CreateObject("ADODB.Command") oCommand.ActiveConnection = oConnection oCommand.CommandType = adCmdText oCommand.CommandText = sCommandText oRecordSet = oCommand.Execute CreateSLXIDFor = DBGetValue(oRecordSet, CStr(0)) oRecordSet = Nothing CloseThis(oConnection) End Function
hope this helps!!(creates some more confusion in you as that was the case with me ...))) |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 28 Aug 07 1:06 PM
|
Originally posted by Raj
I am sorry I didn't get this. In our application we are using SLAPI to generate unique iDS for each table. Since there won't be SLAPI in the future, Can I use this wrapper to generate IDs. To generate we need to log on to SALESLGIX. Does this wrapper LogOn functions work for future versions of SALES LOGIX 7.x? |
|
The wrapper itself contains nothing. It just makes the SLAPI functions in SlgxApi.DLL accessible in .NET. However, if all you need is to create ID values, there are many better ways to do that not (as others have mentioned and linked to articles) |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 28 Aug 07 3:16 PM
|
I don't believe I have ever tried creating IDs for any of these tables, but I would call it a bug rather than FAD. Guess I'll try it out and see what happens. Thanks. |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 29 Aug 07 5:59 AM
|
Originally posted by Lloy Sanders
I don't believe I have ever tried creating IDs for any of these tables, but I would call it a bug rather than FAD. Guess I'll try it out and see what happens. Thanks. |
|
It really is FAD.. or rather a "poor practice".
These tables have their roots in the very earliest version(s) of SalesLogix and are really "internal" tables. Some of us have known about this for years.. They are what they are. -- rjl |
|
|
| |
|
Re: Not able to use SLXAPI in .net
Posted: 30 Aug 07 6:59 AM
|
Originally posted by Lloy Sanders
Just pointing out the difference between FAD and correct |
|
I could write a 1000 page book on bad FAD in SalesLogix.. and still not ever run out of material.. probably volumes...
On the other hand.. there's bad FAD everywhere... -- rjl |
|
|
| |
| |
|
Re: Not able to use SLXAPI in .net
Posted: 31 Aug 07 9:03 AM
|
Dot Dot Dot De Dot Dot De Dot Duh Dot Dot Dot De Dot Dot De Dot Duh Come on, Come on, Come on, Come on, Come on Touch Me Babe......(Horn section: Doot Doot Duh Dee!) |
|
|
|
Re: Not able to use SLXAPI in .net
Posted: 02 Sep 07 5:25 PM
|
Originally posted by RJ Samp
Dot Dot Dot De Dot Dot De Dot Duh Dot Dot Dot De Dot Dot De Dot Duh Come on, Come on, Come on, Come on, Come on Touch Me Babe......(Horn section: Doot Doot Duh Dee!) |
|
Weren't they on acid at the time? -- rjl |
|
|
|