473,326 Members | 2,192 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,326 software developers and data experts.

MSFlexgrid Question!

Jim
How would you guys approach this. Im manually populating a MSFLEXGRID
with records from an access database, and displaying it to the user. I
want to give the user an edit button, putting them in an edit mode
that allows them to change any of the data in the cells using floating
textboxes. Once they were done editing they would click a save button
to commit the changes to the database.

I was going to track the changes using a multidimensional array to
store what row/column changed and what the new value was. Then use an
update statement to update the record in the database. However I see
several problems with that.

The first being that the update statement only allows you to update
one field at a time. If say the record contained 20 fields, and the
user changed all the fields in a record, it would require 20 different
updates statements. Which would bring me to my second problem.

If I was populating the changes as they happened in an array, and then
tried to update based on the information in the array, after I did the
first update statement, the data I was trying to compare to using the
where statement will have changed in the database - but not in the
array. Therefore the update statement would be erroneous and not
update any records.

I could store all the changes and all the data that didnt change in an
array for a particular row, and then delete the original record. Then
use data stored in the array to create a new record using the insert
statement. However, I believe there are limitations to how large an
insert statement can be. Like the number of fields it can contain, or
the actual length of the statement itself. I believe I have ran into
that error before.

So if you wanted to do something like this. How would you store the
changes, and how would you commit all the changes at once when the
user wanted to exit the edit mode and save the changes.

Thanks in advance.
Nov 21 '05 #1
0 1273

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: rv daffin | last post by:
I need to clear the grid between updates without clearing the header row. What is the speediest way to do this? Thanks for your time. -- Dink - There are 10 kinds of people in the world......
0
by: Ed | last post by:
Hi, I am using an MSflexgrid in my c# code. I have a strange problem. My MSflexgrid has only 1 column. Now the data in that column can be long. WIth just 1 column the MSflexgrid does not show...
1
by: PVS | last post by:
Hi, I am new to VC++ 7.0. I want to use MSFlexGrid in my dialog based MFC project in VC++ 7.0 (in VS ..NET IDE). I added the MSFlexGrid control into my resource editor toolbox and I dragged and...
1
by: David Sawyer | last post by:
I am attempting to capture data from the serial port, place that data into a MSFlexGrid and then use that data to parse out Lat/Lon to plot to a map. The problem I am having is when I attempt to...
0
by: Martin K | last post by:
Hello all..thanks for everyone's advice regarding my SHBrowseForFolder API problem, I was able to put together a public class that runs great! But I have another migration headache regarding the...
1
by: Mad Scientist Jr | last post by:
can someone explain how to simply populate a grid in .net ? the way i understand it, there is no more msflexgrid, and instead is this new control that has to be tied to a dataset, and it is a real...
1
by: zoneal | last post by:
Hi, I am involved in the process of migrating vb(6.0) application to vb.net. My application contains only vb controls namely MSFLEXGRID. I want to migrate my application to vb.net completely...
1
by: Steven | last post by:
I develop the application which contains MSFlexGrid to display data. When I try to fill the grid with the text data, I want to adjust the column width so that the width is adjusted to the maximum...
5
by: Ishmael | last post by:
Hi Is Been a 3 Yrs Now (I Still trying to do this) Please help me to do this with Visual Basic 6.0 using Msflexgrid Let say you are the Principal . You have 10 educators and 5 class (Grades)...
2
by: JuAn2226 | last post by:
hi,I got few question here. Hope some one can me. plz help me i running out of time 1. how to make my msflexgrid to display data for every 5 min(especially the number car and average speed. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.