data not being returned, any ideas?

  • Thread starter Thread starter Peter Row
  • Start date Start date
P

Peter Row

Hi,

I have 2 databases on the same SQL Server (2000 sp3). Both DBs have the same
schema.
I have a windows service coded with VB.NET that runs a simple dynamic sql
query of the form "SELECT * FROM Table WHERE Field = 1"

Problem:
When run against DB1 all is fine. However when run against DB2 no data is
returned.
I know with 100% certainty that there is data to return and that the query
is correct because if I paste it into Query Analyser
and run it against DB2 it works fine (and it works when run against DB1)

Anybody have any ideas as to why it may not be working, things I could check
etc...?

Regards,
Peter Row
 
Hi Peter,
I had similar problem, then found out that there's an exception thrown when
selecting from "DB2", and the "catch" block is empty.....So i don't get a
message, and thus don't know where the problem comes from.
Are you sure you are handling all you exceptions?
 
Back
Top