Importing SQL Table to the Data Grid


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: Importing SQL Table to the Data Grid

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Posts
    95

    Importing SQL Table to the Data Grid

    Hi

    I need help with importing SQL database table into the Data Grid using VB.NET . I have a SQL table which I like to bind to the Data Grid . I want to see the data from the SQL table to imported to the Data Grid . How do I do that using VB.NET

    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Oct 2005
    Posts
    95

    .NET Data Grid Help

    Hi

    Thanks for your help . I am able to import data from the SQL Server table to the .NET data Grid and able to update that . I have another request . How do I generate the data grid column dynamically . I like to have user add column in the data grid and able to save that information back to the data base . Also SQL Server table ( where the data grid information will be saved ) will able to create the column dynamically according to the data grid column . So My question is how do I create coulmn in data grid dynamically and also add column in the SQL table dynamically

    Thanks

  4. #4
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You may use the ALTER TABLE SQL command to dynamically add a column to a table. See http://www.vbdotnetheaven.com/Code/Jul2003/2130.asp for more information.

    Once the column is added to the table, simply create a new DataTable that includes the new column and bind it to the DataGrid, as you are already doing.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  5. #5
    Join Date
    Oct 2005
    Posts
    95

    Data Grid Help

    Hi

    Thanks for your help always . I will try and let you know how that go

    Thanks

  6. #6
    Join Date
    Oct 2005
    Posts
    95

    Data Grid Help

    Hi

    Thanks for all your help . I have got the dynamic database field creation working . But I can not save the data that came to the data grid from CSV file to a SQL table . I can import CSV file to a .NET data grid and modify that . But I can not save it to the data base . I like to have client export the data from the CSV file to the data grid and make changes in the data grid and save that back to the SQL server table . How do I do that . Also is that possible to import .CSV data to data grid using SQL Adapter . I can do the import using oledb connection but not SQL connection .

    Thanks

Similar Threads

  1. find version & service packs
    By rperez in forum Database
    Replies: 5
    Last Post: 01-02-2009, 04:14 PM
  2. passing an array to a stored procedure?
    By Michael Shutt in forum Database
    Replies: 25
    Last Post: 08-29-2002, 10:57 PM
  3. Replies: 0
    Last Post: 08-15-2002, 09:57 AM
  4. Turbo Data: test data generator (www.turbodata.ca)
    By Peter Prager (Canam Software) in forum vb.announcements
    Replies: 0
    Last Post: 08-15-2001, 10:48 AM
  5. Loading Data To SQL Table
    By Bill in forum VB Classic
    Replies: 5
    Last Post: 10-03-2000, 03:52 PM

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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center