473,378 Members | 1,518 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Database retrieval to forms

1
I'm very new to VB.NET so basic stuff please. What I'm trying to do is this - I have a flat file of about 100,000 records. I want to display those records on a form depending on certain user selections. I don't like data grids. User may select one of five different combo boxes, and the rest of the data for that record must be displayed in various text boxes. This is all very simple in good old Sunbelt PLB.

What I've tried so far is to create an Access database, and then use OleDbDataAdapter, OleDataConnection and the SQL thingy to do a .Clear and then a .Fill into my form. It takes for ever, so I'm sure this is not a good option, but the first record displays and is sorted on the first of my combo boxes. (How do I get the other combo boxes sorted in their order as well?). If I then change the value of the first combo box, the other combo boxes change to the correct record, but nothing happens to the text boxes. I obviously can't do a .Fill every time because of the number of records.

Has anybody got any ideas for a real novice?
Jan 24 '07 #1
2 1484
enreil
86
The following article provides a good overview of VB.NET's DataSet, which you'll want to be quite familiar with if you are doing work with databases in VB.NET. Even if you don't like datagrids, a dataset provides a disconnected, in-memory copy of your data, which greatly reduces unnecessary overhead. This article may set you looking in the right direction. If not, you know where to come!

http://www.c-sharpcorner.com/UploadF...etsIn.NET.aspx

I'm very new to VB.NET so basic stuff please. What I'm trying to do is this - I have a flat file of about 100,000 records. I want to display those records on a form depending on certain user selections. I don't like data grids. User may select one of five different combo boxes, and the rest of the data for that record must be displayed in various text boxes. This is all very simple in good old Sunbelt PLB.

What I've tried so far is to create an Access database, and then use OleDbDataAdapter, OleDataConnection and the SQL thingy to do a .Clear and then a .Fill into my form. It takes for ever, so I'm sure this is not a good option, but the first record displays and is sorted on the first of my combo boxes. (How do I get the other combo boxes sorted in their order as well?). If I then change the value of the first combo box, the other combo boxes change to the correct record, but nothing happens to the text boxes. I obviously can't do a .Fill every time because of the number of records.

Has anybody got any ideas for a real novice?
Jan 24 '07 #2
kenobewan
4,871 Expert 4TB
You have a data management problem that requires careful planning of your application. A dataset is a good way to handle the data, however your application will run better if you don't have to download/ sort all 100,000 records. So my suggestion is to design the form so that the user has a range of options to select, e.g. last x records or records between certain date range. Then do your database connection and create your dataset from this reduced number of records. Your application should run faster and the user will find it easier to get the info they want...

Hope that this helps.
Jan 25 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

49
by: Relaxin | last post by:
It is just me or has MS created some of the worst ways to access and display data? You can use a DataSet, but if you want to sort or filter the data to must use a DataView which is created from...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
2
by: boyleyc | last post by:
Hi all the following code works perfectly well. Basically it populates a series of check boxes on my form, depending on whether dlookup finds an associated record. The problem i have is that...
12
by: grace | last post by:
i am wondering why my database retrieval becomes too slow...we set up a new server (ubuntu, breezy badger) machine where we transferred all our files from the old server.. Our new server uses Asus...
9
by: Peter Duniho | last post by:
Is there a straightfoward API in .NET that allows for inspection of a database? That is, to look at the structure of the database, without knowing anything in advance about it? For example,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.