Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Typo With DataList
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Typo With DataList

 Post Reply Post Reply
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Topic: Typo With DataList
    Posted: 09 September 2005 at 3:57pm

Can someone please help me? It is obvious that I have a typo somewhere in my data list.

I'm getting the following error message: Compiler Error Message: BC30002: Type 'DataSet' is not defined.

Source Error:

Line 149:                 Dim strSQL as String                 
Line 150:                 Dim dtaTestimonials as New System.Data.SqlClient.SQLDataAdapter()   
Line 151:                 Dim dtsTestimonials As New DataSet() 


  '---------------------------------------------
        ' name: BindDataList()
        '---------------------------------------------
        Sub BindDataList()
       
                 Dim strConnect As String
                 Dim objConnect As New System.Data.SqlClient.SQLConnection
                 Dim objCommand As New System.Data.SqlClient.SQLCommand
                 Dim strSQL as String               &nbs p;
                 Dim dtaTestimonials as New System.Data.SqlClient.SQLDataAdapter()  
                 Dim dtsTestimonials As New DataSet()

                'Get connection string from Web.Config
                strConnect = ConfigurationSettings.AppSettings("ConnectionString")

                objConnect = New System.Data.SqlClient.SQLConnection(strConnect)
               
                objConnect.Open()
       
        'Build SQL string
        strSQL = "Select * From VisitorTestimonial where Approve = 0 Order by DateSigned desc" 

 

                 'Set the Command Object properties
                 objCommand.Connection = objConnect
                 objCommand.CommandType = CommandType.Text
                 objCommand.CommandText = strSQL

                 'Create a new DataAdapter object
                 dtaTestimonials.SelectCommand = objCommand

                 'Get the data from the database and
                 'put it into a DataTable object named dttTestimonials in the DataSet object
                 dtaTestimonials.Fill(dtsTestimonials, "dttTestimonials")

                 'Set the DataSource property of the DataList
                 dtlTestimonials.DataSource = dtsTestimonials
                
                 'Bind all the controls on the page
                 dtlTestimonials.DataBind()

        End Sub 

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 09 September 2005 at 4:24pm
Dim dtsTestimonials As New System.Data.DataSet() 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.