data not being returned, any ideas?

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
 
R

Rami Saad

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top