DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    364

    Dataset Question

    When I put this line in my code:

    dsUser.Tables(0).TableName = "Users"
    ====================================

    Dim da As New SqlDataAdapter("SELECT * FROM Users WHERE UserName = '" & CurrentUser & "'", conn)

    dsUser = New DataSet
    dsUser.Tables(0).TableName = "Users" 'Errors here..!!
    da.Fill(dsUser)

    conn.Close()

    This errors out. It says "Can't find table".

    Any Ideas?

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    I think you want something like the following:

    dsUser = New DataSet
    daFill(dsUser, "Users")
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Similar Threads

  1. Dataset Question
    By jcb1269 in forum .NET
    Replies: 2
    Last Post: 09-29-2006, 09:55 AM
  2. Replies: 1
    Last Post: 01-12-2006, 06:53 PM
  3. Question about get and set xml to DataSet
    By Peter Luo in forum XML
    Replies: 0
    Last Post: 05-01-2003, 05:35 PM
  4. DataSet question
    By Alex in forum .NET
    Replies: 0
    Last Post: 05-29-2002, 05:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links