Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Database > SQL Server

SQL Server Discussion related to SQL Server and MSDE with VB.NET development

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2009, 2:29 PM
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2009
Posts: 12
Reputation: 14
hobgoblinvasya is on a distinguished programming path ahead
Default datareader return zero rows, but query in mssql studio returns one

hi all

as the title of the thread says i have a weird problem. when i execute sqlcommand.executereader, the resulting datareader has no rows.

however if i copy the text in the command text and execute it in my sql server management studio (word for word) it returns one row. is there a setting that i am missing? perhaps a security issue?

i am connecting using trusted connection = yes in my code, and integrated windows security with the sql management studio. thus theoretically the security settings should be exactly the same.

any help would be appreciated.
thanks.

edit: im using vs .net 2005 and sql management studio 2005.

Last edited by hobgoblinvasya; 06-30-2009 at 2:56 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-30-2009, 2:33 PM
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2009
Posts: 12
Reputation: 14
hobgoblinvasya is on a distinguished programming path ahead
Default

ok, nvm. i figured it out right after posting this question. was connecting to the wrong db (replica instead of an actual db.) thus the record simply wasnt there

sorry for the trouble.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 1:10 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.