Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To 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 July 26th, 2007, 03:13 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default Displaying Columns in a DataGrid

I tried searching in this forum for a solution to my problem and I didn't have much luck. Can someone please help me in my program?

I have a table called Transaction_Detail, it has several fields but I do not wish to display all of them. I do not wish to display the SSN but I will need it later on when they update the record in the DataGrid.

Is there a way to do this?
Below is a a snipet of my code.


Private Sub cmdDisplayRecord_Click()

Set rsTransaction_Detail = New ADODB.Recordset
mysql = "SELECT SSN,Tran_ID, Tran_Seq_ID as [Seq No], Tran_Date as [Tran Date], Beg_Balance_Amt as [Beginning Balance] FROM Transaction_Detail WHERE SSN = " & CDbl(txtSSN.Text)
rsTransaction_Detail.CursorLocation = adUseClient
rsTransaction_Detail.CursorType = adOpenDynamic
rsTransaction_Detail.LockType = adLockOptimistic
rsTransaction_Detail.Open mysql, adoBenConn



Set Adodc1.Recordset = rsTransaction_Detail
Label1.Caption = Adodc1.Recordset.Fields.Count
Set rsTransaction_Detail.ActiveConnection = Nothing

Call pInitializeGrid

'Label1.Caption = CStr(rsTransaction_Detail.RecordCount)

End Sub



Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying data in two columns peterh ASP.NET 2.0 Basics 11 January 29th, 2008 11:08 AM
Displaying values in multiple columns in Combo abhijeet BOOK: Professional C#, 2nd and 3rd Editions 1 June 15th, 2005 07:01 AM
displaying multiple fields in columns rbegonia Classic ASP Basics 3 July 31st, 2004 08:37 PM
displaying multiple fields in columns rbegonia XSLT 0 July 29th, 2004 02:21 PM
sub columns in a datagrid pankaj_daga ASP.NET 1.0 and 1.1 Basics 1 October 22nd, 2003 09:20 AM





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