List Info

Thread: RE: System.Data.SqlClient.SqlException: Invalid object




RE: System.Data.SqlClient.SqlException: Invalid object
country flaguser name
United States
2007-05-08 13:44:25

 

Thanks for the input.

I don’t know much about async vs. synchronous WCF so I’m reading up on it.

On the subject of connection string concurrency issue, we do have several databases to access, all the connection strings are stored in a config file in the following format:

<?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?>;

<configuration>

  <connectionStrings>

 &nbsp;  <add name=";Public&quot;

connectionString=&quot;Data Source=(local);Initial Catalog=maindb;Integrated Security=True;Connection Reset=False;Connection Timeout=60" />

 &nbsp;  [multiple similar strings] ...

</connectionStrings>

</configuration>;

 

The web service I’m calling uses two databases and calls “ResetDBConnection” to switch between them.  It executes 2 queries on the Project database then switches to the “MainDB” for a 3rd query.&nbsp; The method for “ResetDBConnection” is listed below and at my first glance looks suspicious to me but remember I’m not totally familiar with this code and less so with iBatis and this has been in use for two years locally with no problems.&nbsp;

 &nbsp; &nbsp; &nbsp;  public static void ResetDBConnection(string connStr)

 &nbsp; &nbsp; &nbsp;  {

 &nbsp; &nbsp; &nbsp; &nbsp;   ; string prevConnStr = Mapper().DataSource.ConnectionString;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; if (prevConnStr != connStr)

 &nbsp; &nbsp; &nbsp; &nbsp;   ; {

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; Mapper().DataSource.ConnectionString = connStr;

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; Mapper().OpenConnection();

 &nbsp; &nbsp; &nbsp; &nbsp;   ; &nbsp; &nbsp; Mapper().CloseConnection();

 &nbsp; &nbsp; &nbsp; &nbsp;   ; }

 &nbsp; &nbsp; &nbsp;  }

 

I think I’ll try a test avoiding the switching of databases to see if this has any effect.&nbsp;

Thanks again

Bob

 


From: Nguyen, Tom [mailto:Tom.Nguyenrels.info]
Sent: Tuesday, May 08, 2007 7:52 AM
To: user-csibatis.apache.org
Subject: RE: System.Data.SqlClient.SqlException: Invalid object

 

Base on the error, I would also suggest checking your connection string.&nbsp; How are you setting up the connection string?&nbsp; It’s a sql error that it cannot find Address or Project Table (guessing).  It could also be a concurrency on issue the database connection.

 

Regards,


Tom Nguyen
Sr. Developer
tom.nguyenrels.info">tom.nguyenrels.info


From: Clough, Samuel (USPC.PRG.Atlanta) [mailto:Samuel_Cloughprincetonrg.com]
Sent: Monday, May 07, 2007 2:29 PM
To: user-csibatis.apache.org
Subject: RE: System.Data.SqlClient.SqlException: Invalid object

 

I'm not a WS expert, but the issue maybe in your service configuration and not really iBatis.&nbsp; I remember someone mentioning something about synchronous vs. async WCF services.&nbsp; Perhaps the web service is not configured to be used by more than one caller.&nbsp; No, that's not logical to me, but I don't understand what people mean by synch vs. async WCF services.&nbsp; I mean all server-side services as async in my mind, but maybe I missed it.

 

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )