Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET 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 October 17th, 2003, 11:08 PM
Authorized User
 
Join Date: Oct 2003
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO.NET Dataset Questions

Hi! I got few questions to ask regarding the ado.net dataset.

1) Can I have more than 1 table views (sql2000) in 1 dataset?
2) How do I make the connection if I have more than 1 table views in my dataset?

eg. (For 1 table views)

        Dim vNric As String
        Dim objReport As New cr_Test() 'Crystal Report
        Dim myDataSet As New DS_Test() 'Dataset1

        SqlStmt = "SELECT * from vIND_Profile where nric_fin = '" & txtID &"'"
        myCmd = New SqlCommand(SqlStmt, sqlConn)
        mySqlAdapter = New SqlDataAdapter(SqlStmt, sqlConn)
        mySqlAdapter.Fill(myDataSet, "vIND_Profile")

        objReport.SetDataSource(myDataSet)
        Me.CrystalReportViewer1.ReportSource = objReport


------------------------

The above only for 1 table views. How to do the codes if I have more than 1 tables?

Thanks.

Regards,


 
Old October 20th, 2003, 12:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I'm not familiar with crystal reports. When you set the report data source, try this:

objReport.SetDataSource(myDataSet.Tables("vIND_Pro file"))

or:

objReport.SetDataSource(myDataSet.Tables("vIND_Pro file").DefaultView)

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
database connections...Dataset...questions... benfowler VB.NET 1 April 29th, 2008 02:14 PM
ADO.NET dataset with join divinyl Crystal Reports 4 January 26th, 2006 03:12 AM
ADO questions please help... cpopham Access VBA 1 January 3rd, 2004 06:40 PM
Returning resultset to ADO.NET dataset gp_mk Oracle 3 December 22nd, 2003 10:44 AM
ADO.NET Dataset winnie1778 Crystal Reports 0 October 17th, 2003 04:44 AM





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