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!
|
|
Data Source and Initial Catalog (ROUND 2)
Posted: 08 Jan 07 7:14 PM
|
fiogf49gjkf0d Maybe I'm missing something...?
I get this error when using slx_getServerList(): "Failed to execute internal SalesLogix procedure"
The Sage reference states that there should be one input parameter, but it does not state what it should be. I have not seen any parameters anywhere within the forum.
Once again, thanks in advance for your help! |
|
|
| |
|
Re: Data Source and Initial Catalog (ROUND 2)
Posted: 09 Jan 07 7:55 AM
|
fiogf49gjkf0d I was pretty sure that was the case; thanks for clarifying that. I'm using the same connection string as in your article. Here is the code (VB .NET in Visual Studio 2003):
############################################################# Imports System.Data.OleDb
...
Dim objCommand As New OleDbCommand Dim objConnection As New OleDbConnection Dim strSQL, strConnection, RWPass As String Dim objDataReader As OleDbDataReader Dim ServerArray As New ArrayList
strConnection = "Provider=SLXOLEDB.1;Data Source=;Initial Catalog=NO_ALIAS; Extended Properties=Port=1706;Log=On" objConnection.ConnectionString = strConnection objConnection.Open()
objCommand.Connection = objConnection objCommand.CommandText = "slx_getServerList()"
Try objDataReader = objCommand.ExecuteReader(CommandBehavior.CloseConnection) While objDataReader.Read ServerArray.Add(objDataReader.GetString(0)) End While
objDataReader.Close()
Catch Ex As OleDbException MessageBox.Show(Ex.Message)
End Try
objCommand = Nothing objConnection = Nothing #############################################################
The Try-Catch gives the following error message after the line "objDataReader = objCommand.ExecuteReader(CommandBehavior.CloseConnection)" is executed:
"Failed to execute internal SalesLogix procedure."
While testing, I specified a known Data Source (MYSERVER) in the connection string and ran "sp_AliasList()" without a problem. ServerArray contained all the aliases I was expecting. (ServerArray is actually meant to contain the list of servers. This was for testing only, and the code is now as it is above.)
Thoughts? |
|
|
|
Re: Data Source and Initial Catalog (ROUND 2)
Posted: 09 Jan 07 9:38 AM
|
fiogf49gjkf0d The only thing that sticks out at first glance is the connection string. You have this:
strConnection = "Provider=SLXOLEDB.1;Data Source=;Initial Catalog=NO_ALIAS; Extended Properties=\Port=1706;Log=On\"
You likely copied that from the article (which is C#) and didn't remove the escape characters for the quotes on the extended properties (notice the back-slashes in front of "Port" and after "Log=On" - those need to be removed). Change it to this:
strConnection = "Provider=SLXOLEDB.1;Data Source=;Initial Catalog=NO_ALIAS; Extended Properties=Port=1706;Log=On"
Give that a try. |
|
|
|
Re: Data Source and Initial Catalog (ROUND 2)
Posted: 09 Jan 07 9:55 AM
|
fiogf49gjkf0d I updated the connection string in my original post and in my code, and I still get the same error message: "Failed to execute internal SalesLogix procedure." |
|
|
|
Re: Data Source and Initial Catalog (ROUND 2)
Posted: 09 Jan 07 10:17 AM
|
fiogf49gjkf0d Which version of SLX are you using? Are you on v7? I just tried some code using slx_getServerList on v7 and I get the same error (this is code that was definitely working with v6.2.x).
I'll check to see if it is in fact a bug and get it reported if so. I'll keep you posted. |
|
|
|
Re: Data Source and Initial Catalog (ROUND 2)
Posted: 09 Jan 07 10:23 AM
|
fiogf49gjkf0d Yes, it's for v7. Did I forget to mention that? Sorry!
A bug, huh? Well, that would explain a few things!
I was referring to v7 documentation about slx_getServerList(), and it did mention that it required one paramater. However, it did not state what the parameter should be. Do you think that could resolve the error? Thanks for checking it out! |
|
|
|
Re: Data Source and Initial Catalog (ROUND 2)
Posted: 09 Jan 07 11:06 AM
|
fiogf49gjkf0d Originally posted by Lou
"Failed to execute internal SalesLogix procedure"
|
|
I believe this is also the error message it gives you when you're trying to query servers and none are returned. In my adaptation of Ryan's login screen code, I commented out the throw statement in GetServerList()'s catch block. If I were smart I would have figured out how to parse for this error and return something like "no servers found". The only issue I have with that is I'm not entirely sure this is the only error that generates the "failed to execute" statement. I wouldn't want an actual problem reporting that no servers are found (though that is likely what the result would be anyway). |
|
|
|
Re: Data Source and Initial Catalog (ROUND 2)
Posted: 09 Jan 07 11:49 AM
|
fiogf49gjkf0d The usual parameter list is either something like param1 [parameter] or 1: WHATEVER and this follows neither convention. Unless of course the parameter is the number 1 or string "One".
This may not be classified as a bug if the internal functions use the stored procedure. The only buggy part is we're not privvy to the parameter. I moved my application to my v7 vm and GetServerList() returned information 90% of the time. Only 1 time did I get the "Failure to execute internal procedure" message. This is WITHOUT the parameter, so there's definitely something fishy going on.
I thought I could use the SLXProfiler.exe on my app but it doesn't become hookable until after I make the initial GetServerList() call. Subsequent calls return nothing in the profiler either. I get errors when my program proceeds to query the database so it seems to be profiling correctly, I just don't think GetServerList() is watchable. |
|
|
| |
|