Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7
This is the forum to discuss the Wrox book Professional SQL ServerReporting Services by Paul Turley, Todd Bryant, James Counihan, George McKee, Dave DuVarney; ISBN: 9780764568787
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 23rd, 2006, 03:55 AM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using VB.Net to change the SQL Statment

Hi,

I want to ask, can I use VB .Net to change the SQL statment of a dataset. My case is I need to prepare a UI for user to choose a criteria, then base on it to build the SQL statment where clause.

Thx.

  #2 (permalink)  
Old March 31st, 2006, 04:17 AM
Wrox Author
Points: 183, Level: 3
Points: 183, Level: 3 Points: 183, Level: 3 Points: 183, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: Vancouver, Washington, USA.
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sure
Write a VB function that returns a string and call the function in the dataset expression. The only caveat is that the enture SQL query must be in the form of a string expression:

="SELECT some columns FROM some tables " &
"WHERE " & Code.MyWhereClauseFunction()

Paul Turley, MCSD, MCDBA, MCT, MSF Practitioner


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard SQL languge statment Questioin Mangore SQL Language 8 October 27th, 2008 03:01 AM
insert & update statment problem (sql express) abdrabaa C# 2 July 15th, 2007 05:54 AM
SQL Statment btpoole VB Databases Basics 1 February 18th, 2004 01:03 PM
Change line in VB.net Dinesh22 VB.NET 2002/2003 Basics 2 January 16th, 2004 02:27 PM
SQL statment arshad mahmood VB Databases Basics 1 July 1st, 2003 02:10 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.