Unix Technical Forum

Dataset Code Debugging

This is a discussion on Dataset Code Debugging within the SQL Server forums, part of the Microsoft SQL Server category; --> Is there any better way to debug a query encased in IIF statements than to find bugs at runtime? ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 06:46 AM
Michael.EJ.Reynolds@gmail.com
 
Posts: n/a
Default Dataset Code Debugging

Is there any better way to debug a query encased in IIF statements than
to find bugs at runtime? I have an especially ugly CommandText for one
of my datasets, and debugging it when there is an error is nearly
impossible. I realize that it's much cleaner when you have straight
SQL, but otherwise the tool doesn't seem to be very user-friendly.

Thanks,
Mike

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 06:46 AM
Simon Hayes
 
Posts: n/a
Default Re: Dataset Code Debugging


<Michael.EJ.Reynolds@gmail.com> wrote in message
news:1111518034.501566.244880@o13g2000cwo.googlegr oups.com...
> Is there any better way to debug a query encased in IIF statements than
> to find bugs at runtime? I have an especially ugly CommandText for one
> of my datasets, and debugging it when there is an error is nearly
> impossible. I realize that it's much cleaner when you have straight
> SQL, but otherwise the tool doesn't seem to be very user-friendly.
>
> Thanks,
> Mike
>


I'm not sure exactly what you're working with - MSSQL doesn't have an IIF
function, and debugging a dataset (ADO.NET?) sounds like a client-side
operation, not a server-side one. If you mean you're building up a dynamic
query string for MSSQL using IIF, then you could use Profiler to see what it
eventually sends to the server, or just print out the final query string
before executing it. But you'll probably get a better response in an ADO or
client application group.

If this isn't helpful, or if I misunderstood your question, then I suggest
you post some more details about your environment and what you're trying to
achieve, perhaps with a (simplified) piece of code to show exactly what you
mean.

Simon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:45 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com