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!
|
|
slx_GetServerList
Posted: 11 Jul 06 3:55 PM
|
fiogf49gjkf0d slx is 6.2.3, sql 2000, local OS is Win2K, slx works fine
I have been unable to get this to work in vb.net using the code below.
Dim cmd As New OleDbCommand Dim conn As OleDbConnection = GetConn("SERVERS") 'gets the connection string 'connection string = "Provider=SLXOLEDB.1;Initial Catalog=NO_ALIAS;Extended Properties="Port=1706;Log=On" Dim rdr As OleDbDataReader
Try
cmd.Connection = conn cmd.CommandText = "slx_getServerList()"
rdr = cmd.ExecuteReader()
If rdr.HasRows Then
Do While rdr.Read
frm.cboDBName.Items.Add(rdr.GetString(0))
Loop
End If
Catch ex As Exception MessageBox.Show(ex.Message)
Finally If conn.State = ConnectionState.Open Then conn.Close()
rdr.Close() rdr = Nothing cmd.Dispose() conn.Dispose()
End Try
The error occurs at the "ExecuteReader" line -- it says that a saleslogix function failed. Not real helpful.
Here's the question -- from what I've seen, a great many people have had problems with this function. Does it work?
And, if so, what am I doing wrong?
Thanks.
|
|
|
|
Re: slx_GetServerList
Posted: 18 Jul 06 12:18 AM
|
fiogf49gjkf0d I don't see anything wrong with the code, and the slx_GetServerList function certainly does work for me.
It doesn't look like the code is the problem, at least at first glance, but see if you get the same result using the code sample posted on this site: http://www.slxdeveloper.com/page.aspx?id=35&articleid=58
Also, what is the exact text of the error, and perhaps the stack trace would help? |
|
|
|
Re: slx_GetServerList
Posted: 18 Jul 06 10:25 AM
|
fiogf49gjkf0d Here's the question -- from what I've seen, a great many people have had problems with this function. Does it work? |
|
I had an issue with it yesterday...I was connected from home via VPN and it failed with the same error. I disconnected my VPN and it worked fine. I'm not sure why that would make a difference. Fortunately for me, I was just testing and trying to see if I picked up other slx servers on the network besides my laptop, so I could continue on with no issues. Of course, if it really is something related to VPN's, then it could cause a problem for users at some point.
Jeff
|
|
|
|
Re: slx_GetServerList
Posted: 18 Jul 06 11:07 AM
|
fiogf49gjkf0d Jeff,
I don't know what you are using for VPN but some clients shut down ports. Could this be what caused your failure? |
|
|
|
Re: slx_GetServerList
Posted: 18 Jul 06 11:11 AM
|
fiogf49gjkf0d Frank,
I was using the generic microsoft VPN connection - and I can usually see a list of SLX servers when running SalesLogix and building connections, so it may be possible, but I don't think that was my issue.
Thanks, though, because I hadn't thought of that. I'll have to look at it some more to see if that was it.
Jeff
|
|
|
|
Re: slx_GetServerList
Posted: 18 Jul 06 11:51 AM
|
fiogf49gjkf0d slx_GetServerList does NOT work across subnet boundaries. You will get an exception message in .NET that says something like "Function is not working". It doesn't quite explain the problem but at least it's a nice message unlike a typical .NET blast.
A typical 1 to 1 VPN connection will usually pass the subnet packets along or you are typically an IP address on the same subnet, negating the need. I use a VPN that links my entire home network to the entire work network using Linux. I have to consistently remember that if I'm going to test from this location, I have to first make the server connection directly and then sp_alias() and all of the other functions work just fine.
You have no idea how much this frustrated me until I figured out the subnet issue. I thought my program was broken until I realized it worked perfectly while I was testing at work but failed miserably at home. |
|
|
|
Re: slx_GetServerList
Posted: 18 Jul 06 1:22 PM
|
fiogf49gjkf0d Originally posted by Jeremy Brayton
slx_GetServerList does NOT work across subnet boundaries. You will get an exception message in .NET that says something like "Function is not working". |
|
I get a OleDbException: "Failed to execute internal SalesLogix procedure." I use the code from Ryan's article as a base (changed to use OleDbConnectionStringBuilder). In that post I thought RWPass was needed but I verified it doesn't for at least read only access for 6.2. As for 6.1 or read/write it may be necessary but I think if you use a valid username/pass in the connection string it may do the work for you. |
|
|
|
Re: slx_GetServerList
Posted: 30 Jul 06 5:50 PM
|
fiogf49gjkf0d Originally posted by Jeremy Brayton
slx_GetServerList does NOT work across subnet boundaries. You will get an exception message in .NET that says something like "Function is not working". It doesn't quite explain the problem but at least it's a nice message unlike a typical .NET blast.
A typical 1 to 1 VPN connection will usually pass the subnet packets along or you are typically an IP address on the same subnet, negating the need. I use a VPN that links my entire home network to the entire work network using Linux. I have to consistently remember that if I'm going to test from this location, I have to first make the server connection directly and then sp_alias() and all of the other functions work just fine.
You have no idea how much this frustrated me until I figured out the subnet issue. I thought my program was broken until I realized it worked perfectly while I was testing at work but failed miserably at home. |
|
Correct... GetServerlist does a broadcast that does not cross subnet boundries. Also, as has been stated.. there is the "port" issue w/some VPN technologies. -- rjl |
|
|
|