Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populating new dataset

Status
Not open for further replies.

Yogeetarp

Programmer
Jun 7, 2006
10
US
I have an access database and I need some advice on how to convert each record/row of the access table into a new table. The main goal is to populate a VB datagrid for each record and allow the user to update it.

Would it be recommended to create yet another actual table to copy the data OR should I populate a dataset to do the same, so that I am not creating duplicate data tables.

It would be helpful if I can get some tips on populating dataset for each row/record, because that's where I am having major difficulties.

Any suggestions, tips would be helpful and appreciated.

Thanks

 
Hi and welcome to Tek-Tips. To get the best from these forums please read faq222-2244 carefully.

In VB6 you can use an ADODC datacontrol and bind the datagrid to the datacontrol

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Your terminology is a bit fuzzy so I'll take some guesses about the meaning of some of your terms.

DataSet isn't really a RDBMS term. In database systems we have databases, tables, queries, fields, indexes, keys, relations, etc. at the database level. Additionally, we have data grids, recordsets and (possibly) data controls at the programming language level.

Assuming that you are programming in VB and using ADO to talk to the Access database, the usual sequence is

[li]Drop an ADO DataGrid Control onto a Form[/li]
[li]Set the datagrid's properties to allow (or not allow) editing, adding or deleting as appropriate.[/li]
[li]Create an ADO connection and open it.[/li]
[li]Create an ADO Recordset and open it using the appropriate SQL.[/li]
[li]Set the datagrid's recordsource property to be the recordset that you just opened. You can also use an ADO Data Control for that purpose.[/li]
[li]Proceed to edit, add, delete records in the data grid and the data grid will take care of appropriately updating the underlying database table (or tables).[/li]
 
and as you are starting, I would advise you to look very well at using BOUND controls versus UNBOUND controls.

Also dataset is normally a term used by .NET. if that is the case then please state that in advance of all questions you post here, as VB.NET is NOT the same thing as VB 6

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top