473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

wrong query results in SQL Server 2000 from VB.NET

I have a relatively simple SQL Server 2000 database which I am
querying from a VB.NET application. The query is very simple, such as
SELECT * FROM tblSystems. Let's say there are 10 records in the table
tblSystems. I expect to get 10 records from this query, and sometimes
do. But for some reason, I start getting 0 records from my app. If I
run the same query in SQL Server's Query Analyzer, it works fine. If
I reboot my machine, then it seems to work fine for a while, then
starts giving me bad results again. I am running my app on the same
machine as SQL Server, although I can connect to my database remotely
through my app, and I get the same results either way. Anyone seen
anything like this? Was this fixed in a service pack (I'm using SP1,
and don't want to install a newer one unless it's a known fix)?

Thanks,

Andrew
Jul 20 '05 #1
1 1851
"Andrew" <ma**********@yahoo.com> wrote in message
news:88**************************@posting.google.c om...
I have a relatively simple SQL Server 2000 database which I am
querying from a VB.NET application. The query is very simple, such as
SELECT * FROM tblSystems. Let's say there are 10 records in the table
tblSystems. I expect to get 10 records from this query, and sometimes
do. But for some reason, I start getting 0 records from my app. If I
run the same query in SQL Server's Query Analyzer, it works fine. If
I reboot my machine, then it seems to work fine for a while, then
starts giving me bad results again. I am running my app on the same
machine as SQL Server, although I can connect to my database remotely
through my app, and I get the same results either way. Anyone seen
anything like this? Was this fixed in a service pack (I'm using SP1,
and don't want to install a newer one unless it's a known fix)?

Test Workaround:

Try creating a stored procedure by placing

create stored procedure TESTPROC
as
SELECT * FROM tblSystems

in QA and running in the detsination database.
Then have the VB call the SQL proc.


Pete Brown
Falls Creek
OZ

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: san | last post by:
Hi, I wanted to know if this is possible and if so, how do I do it. Say, I have a query "SELECT * FROM Table WHERE Column="some_value". This executes on a very large data set and I would like...
4
by: M Wells | last post by:
Hi All, I have a table that currently contains approx. 8 million records. I'm running a SELECT query against this table that in some circumstances is either very quick (ie results returned in...
1
by: steve | last post by:
Does SQL Server have a query cache similar to mysql, whereas the query result is cached, if the table has not been changed? If so, please refer me to more info. Thanks. --...
5
by: Krisnamourt Correia via SQLMonster.com | last post by:
I have one query that executes many times in a week. I created one Maintenances plan that Rebuild all index in my Database that has been executed at 23:40 Saturday until stop finished at Sunday. ...
8
by: Adam Louis | last post by:
I would like help resolving this problem. I'm a novice who's been hired to query a hospital database and extract useful information, available to me only in a dynamically generated, downloadable...
1
by: JM | last post by:
Hello, A very simple select query (no joins) to a linked ODBC SQL Server 2000 table produces incorrect results. The right number of rows seem to be returned, but some of the columns have...
3
by: Martini | last post by:
Hello all. I have quite disturbing situation where I am not happy about the way how SQL handles the query. Situation is related to using user function in INNER JOIN select. Although the problem...
1
by: santiago | last post by:
Hello. I'm having troubles with a query that (should) return all the records between two dates. The date field is a datetime type. The db is SQL Server 2000. When I try this SELECT ...
0
by: RCapps | last post by:
When running the below SQL Query I keep getting the following error: Server: Msg 4924, Level 16, State 1, Line 1 ALTER TABLE DROP COLUMN failed because column 'ContractDef' does not exist in table...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.