03-12-2010 10:57 AM
Hi Folks,
I was reading the documentation on creating web services put out in 2006 by Sage. My ultimate goal os to attempt Lead creation via HTTP POST. So I quickly threw together a web service that accepts login credentials and attempts to connect to SalesLogix. (Eventually of course the login will be automatic). It worked once but since then, I keep getting:
Login Failed with error: Failed to connect to SLXServer. Check if server is running and is compatible with the current provider version. 0 SalesLogix OLE DB ProviderProvider=SLXOLEDB.1
I'm able to login via the client - so the server is running. And I connected once successfully so the provider shouldn't be a problem either. Is there a better way to connect?
The class declaration is:
Public Class Service1 Inherits System.Web.Services.WebService
Private adoConnection As New ADODB.Connection
And then the method:
Public Function SLXLogin(ByVal SLXServerName As String, ByVal SLXConnectionAlias As String, ByVal UserName As String, ByVal Password As String)As String
Dim ConnectionStr As String
adoConnection = New ADODB.ConnectionConnectionStr = "Provider=SLXOLEDB.1; Data Source=" & _
SLXConnectionAlias & ";User ID=" & UserName & ";" & _
"Password=" & Password & "; Extended Properties= " & _"SLX SERVER=" & SLXServerName & _
";Address=localhost;TYPE=ODBC;PORT=1706;"
On Error GoTo ErrRouteCall adoConnection.Open(ConnectionStr)
adoConnection.CursorLocation = ADODB.CursorLocationEnum.adUseClient
Any insight is greatly appreciated.
Thanks.
03-12-2010 10:59 AM
Just another option for you, here is a sData example on how to create leads. Not sure if you want to look in this direction but I thought it could help.
http://sites.google.com/site/genesprojects/Home/saleslogix-example/web2lead-with-workflow
03-12-2010 11:35 AM
Hi Gene,
I've read a bit about sData and this seems really helpful. I'm going to play around w/it. The problem for us is that the data supplier will only support web service postings, so from our side the entity has to be facing outside Saleslogix.
Thanks a bunch for this.
03-12-2010 11:53 AM
Apparently this works:
ConnectionStr = "Provider=SLXOLEDB.1;Password=" & password & ";Persist Security Info=True;" & _
"User ID=" & UserName & ";Initial Catalog=" & SLXServerName & ";Data Source=USPHL0ASL1;" & _
"Extended Properties=PORT=1706;LOG=ON"
Looking through your code Gene, it seems you only need to add an entry to the LEAD table, but I thought you had to also make one in LEAD_ADDRESS.
Thanks
03-12-2010 12:27 PM