|
List Info
Thread: RE: System.Data.SqlClient.SqlException: Invalid object
|
|
| RE: System.Data.SqlClient.SqlException:
Invalid object |
  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="1.0" encoding="utf-8"
?>
<configuration>
<connectionStrings>
<add name="Public"
connectionString="Data Source=(local);Initial Catalog=maindb;Integrated
Security=True;Connection Reset=False;Connection Timeout=60" />
[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. 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.
public static void ResetDBConnection(string connStr)
{
string prevConnStr = Mapper().DataSource.ConnectionString;
if (prevConnStr != connStr)
{
Mapper().DataSource.ConnectionString = connStr;
Mapper().OpenConnection();
Mapper().CloseConnection();
}
}
I think I’ll try a test avoiding the
switching of databases to see if this has any effect.
Thanks again
Bob
From: Nguyen, Tom [mailto:Tom.Nguyen rels.info]
Sent: Tuesday, May 08, 2007 7:52
AM
To: user-cs ibatis.apache.org
Subject: RE:
System.Data.SqlClient.SqlException: Invalid object
Base on the error, I would also suggest
checking your connection string. How are you setting up the connection
string? 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.
Tom Nguyen
Sr. Developer
tom.nguyen rels.info">tom.nguyen rels.info
From: Clough, Samuel (USPC.PRG.Atlanta)
[mailto:Samuel_Clough princetonrg.com]
Sent: Monday, May 07, 2007 2:29 PM
To: user-cs ibatis.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. I remember someone
mentioning something about synchronous vs. async WCF services. Perhaps
the web service is not configured to be used by more than one caller. No,
that's not logical to me, but I don't understand what people mean by synch vs.
async WCF services. 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 )
|