Re: Two different dsns return the same dataset

Tech-Archive recommends: Fix windows errors by optimizing your registry



"walter1234" <walter1234@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BFE54174-3330-4117-9369-0F667354E9C0@xxxxxxxxxxxxxxxx
I have a program that fetches data from sqlAnywhere databases using a dsn
that connects to a remote server via ip. I'm using v2005(no
sp1),c#,.NET2.0

the start command in the dsn setup is:
c:\sqlany50\win32\dbclient.exe -x tcpip{host=24.105,158.17}

There are two different dsns with two different ips

I use the following code to fetch the data:
OdbcDataReader dr = null;
OdbcCommand cmd;
OdbcConnection cn = new OdbcConnection();
cn.ConnectionString = "Dsn=pds_pilot_remote;UID=dba;pwd=sql";
// cn.ConnectionString =
"Dsn=pds_kensington_remote;UID=dba;pwd=sql";
cn.Open();
cmd = new OdbcCommand(sql, cn);
dr = cmd.ExecuteReader();
<process the dataReader>

Problem is, I get the same data regardless of which dsn I use
pilot and kensington both return the same datareader.


Can anybody explain why this happens? Is it possible that ODBC is caching
the connection and not clearing the cache?
I tried turning on the ODBC tracing, but the log file didn't tell me
anything.
Any help would be appreciated
TIA



Are you using the same SELECT statement? If so, is it possible that both
databases contain the same information?

--
============
Frank Hickman
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.


.