Do you have a complete project that you could send to me to look at?
Want to know more? Check out the MSDN Library at
http://msdn.microsoft.com or the Microsoft Knowledge Base at
http://support.microsoft.com
Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email :
(E-Mail Removed) <Remove word online. from address>
This posting is provided “AS IS”, with no warranties, and confers no rights.
--------------------
>Content-Class: urn:content-classes:message
>From: "steve" <(E-Mail Removed)>
>Sender: "steve" <(E-Mail Removed)>
>Subject: datasets
>Date: Mon, 21 Jul 2003 17:40:36 -0700
>Lines: 106
>Message-ID: <066001c34fe9$de02de10$(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcNP6d4C+N+oTXwXQbGl6/n3qApwMg==
>Newsgroups: microsoft.public.dotnet.framework.adonet
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.adonet:56378
>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
>X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
>
>I am using the SQLHelper class provided in the data
>application blocks but I am then trying to Ctype the DS
>that is returned into a custom dataSet. I am working in
>VB.net can ANYONE please help. I tried merge but I end
>up with 2 tables in the ds. My empty one from the
>constructor and the one that is returned.
>
>
>Option Strict On
>Option Explicit On
>
>Imports System
>Imports System.Data
>Imports System.Runtime.Serialization
>
>
>Namespace Data
> <System.ComponentModel.DesignerCategory("Code"),
>SerializableAttribute()> Public Class EventListData
> Inherits DataSet
>
> '
> ' Event table constants
> '
> Public Const EVENTLISTVARIABLES_TABLE As String
>= "EventListVariables"
> Public Const EVENTID_FIELD As String = "EventId"
> Public Const PRODUCERID_FIELD As String
>= "ProducerId"
> Public Const EVENTNAME_FIELD As String
>= "EventName"
> Public Const REDIRECTURL As String = "RedirectURL"
> Public Const BACKGROUNDURL As String
>= "BackGroundURL"
> Public Const PAGETITLE As String = "PageTitle"
> Public Const POPUPHEIGHT As String = "PopUpHeight"
> Public Const POPUPWIDTH As String = "PopUoWidth"
> Public Const DOWNLOAD As String = "DoenLoad"
>
>
> 'Public Const INVALID_FIELD As String = "Invalid
>Field"
> 'Public Const INVALID_FIELDS As String = "Invalid
>Fields"
>
> '-------------------------------------------------
>---------------
> ' Sub New:
> ' Constructor to support serialization.
> '-------------------------------------------------
>---------------
>
> Public Sub New(ByVal info As SerializationInfo,
>ByVal context As StreamingContext)
> MyBase.New(info, context)
> End Sub
>
>
> '-------------------------------------------------
>---------------
> ' Sub New:
> ' Initialize a CategoryData instance by
>building the table schema.
> '-------------------------------------------------
>---------------
> Public Sub New()
> MyBase.New()
> '
> ' Create the tables in the dataset
> '
> BuildDataTables()
> End Sub
>
>
> '-------------------------------------------------
>---------------
> ' Sub BuildDataTables:
> ' Creates the following datatables: Event
> '-------------------------------------------------
>---------------
> Private Sub BuildDataTables()
> 'Create the tabe that will be returned
> ' Create the Event table
> '
> Dim table As DataTable = New DataTable
>(Me.EVENTLISTVARIABLES_TABLE)
> With table.Columns
> .Add(EVENTID_FIELD, GetType(System.Int32))
> .Add(PRODUCERID_FIELD, GetType
>(System.Int32))
> .Add(EVENTNAME_FIELD, GetType
>(System.String))
> .Add(REDIRECTURL, GetType(System.String))
> .Add(BACKGROUNDURL, GetType
>(System.String))
> .Add(PAGETITLE, GetType(System.String))
> .Add(POPUPHEIGHT, GetType(System.Int32))
> .Add(POPUPWIDTH, GetType(System.Int32))
> .Add(DOWNLOAD, GetType(System.String))
> End With
> 'add the table
> Me.Tables.Add(table)
> End Sub
> End Class
>End Namespace
>
>