Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 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
 
Old May 15th, 2004, 05:54 AM
Authorized User
 
Join Date: Nov 2003
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB6 DataReport and ADO

Hi,

I've never used the DataReport and want to display/print some parametrized queries from SQL Server at run-time, such as ".. WHERE EmpId = <variable>".

Q_1: Is there a way to generate a recordset and subsequently display it via DataReport ? I generate a lot of recordsets for the HFlexGrids in my software, but somehow I cannot do it with the DataReport.

Q_2: If I have to use the DataEnvironment, how can I parametrize my query so that it can use run time parameters ?

Thanx

Mike

 
Old June 8th, 2004, 12:01 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Select the SQL option in the command properties.
Ex: SELECT empno,empname,dept FROM emp WHERE empno=?

and in the next page select the datatype of the parameter

if it is number select Integer







Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening ,dbf file through ADO in VB6? vchell VB Databases Basics 2 September 11th, 2007 03:43 AM
VB6 database ADO recordset error tsehenuk Beginning VB 6 12 January 31st, 2005 07:33 PM
Intercepting ADO Errors in VB6 mike123abc Pro VB Databases 1 January 28th, 2005 11:08 PM
VB6 ADO Dynamic Data Binding Question pad Pro VB Databases 1 January 28th, 2005 10:43 PM
DataReport btpoole VB Databases Basics 1 February 19th, 2004 10:46 AM





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