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 - SalesLogix OLEDB Provider
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix OLEDB Provider | New ThreadView:  Search:  
 Author  Thread: After connection.open neither any exception nor return back, When data source is wrong?
Raju Maharjan
Posts: 1
 
After connection.open neither any exception nor return back, When data source is wrong?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Apr 10 1:55 PM
Do anybody know why atfter Oledbconnection.open is executed with wrong datasource name in connection string neither it caught any exception nor returns back to the debugging mode? It seems it went to black hole.
Now when I need to select data source from the list of servers , if there is one wrong server name then system hang on and I am being unable to trap that error. Any kind of help will be highly appreciable.

I have following code :

string connString = "Provider=SLXOLEDB.1; Data Source=WrongDatasourceName; Persist Security Info=True; User ID=Admin; Password=password;Initial Catalog=Test; Extended Properties='PORT=1706; LOG=ON; '" ;

using (OleDbConnection cn = new OleDbConnection(connString))
{
try
{
cn.Open();//when the datasource is wrong it seems to stuck at this point.
using (OleDbCommand cmd = new OleDbCommand(Resources.slxGetAliasListStoredProc, cn))
{
using (OleDbDataReader rdr = cmd.ExecuteReader())
{
while (rdr.Read())
{
string alias = rdr.GetString(0);
result.Add(alias);
}
}
}
}
catch (Exception ex)
{

throw new Exception(ex.Message);
}
finally
{
if (cn.State == System.Data.ConnectionState.Open)
{
cn.Close();
}
}
}

It doesn't caught any exception at all, but after execution of cn.Open() just hang on. This problem seems really weird.
[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 12:02:25 PM