473,774 Members | 2,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to store table field names in array then use to update table

Hi I am using WinXP and Access 2003
Is it possible to store the field names of a table in an array and then
loop through the array and update the table using the field names stored
in the array? I can't figure out the coding to accomplish this.
I have an Excel application that is a monster and it has become too much
to maintain and test. I didn't write it but i support it. I am trying to
convert this application to Access and it is not as easy as it sounds.
Lots of field names and lots of tables. I have actually exceeded the
maximum number of field names in a table causing me to breakdown the
data and create more tables...

TIS

Tim Hunter

*** Sent via Developersdex http://www.developersdex.com ***
Jan 25 '07
11 10308
rkc <rk*@rochester. yabba.dabba.do. rr.bombwrote in
news:45******** *************** @roadrunner.com :
Tim Hunter wrote:
>Hi I am using WinXP and Access 2003
Is it possible to store the field names of a table in an array
and then loop through the array and update the table using the
field names stored in the array? I can't figure out the coding to
accomplish this. I have an Excel application that is a monster
and it has become too much to maintain and test. I didn't write
it but i support it. I am trying to convert this application to
Access and it is not as easy as it sounds. Lots of field names
and lots of tables. I have actually exceeded the maximum number
of field names in a table causing me to breakdown the data and
create more tables...

Come on now, creating an Access application is as simple as
selecting one of the many pre-made templates and entering or
tranfering your data. Anyone can point and click their way to
success without ever having to consult with a ridiculously highly
paid database developer. Some of them already have enough money as
it is any way.
I think you should have put <sarcasm></sarcasmtags around that, as
I assume you were being sarcastic.

I think Access makes it quite easy to create tables and queries and
forms and reports and macros. But I don't think it makes it easy to
do any of those things properly or well. That requires knowledge and
experience, and that's why I read your quoted paragraph as being
sarcastic.

My experience is that most novices don't have the background in data
schema design and that leads them to most of their problems. As
Larry said, this looks like a case where a spreadsheet-type design
is being used, and that's one of the most common causes of major
problems in designing a database application, i.e., a non-normalized
design.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 26 '07 #11
Tim Hunter <th*****@roches ter.rr.comwrote in
news:45******** *************@n ews.qwest.net:
Is it possible to store the field names of a table in an array and
then loop through the array and update the table using the field
names stored in the array? I can't figure out the coding to
accomplish this. I have an Excel application that is a monster and
it has become too much to maintain and test. I didn't write it but
i support it. I am trying to convert this application to Access
and it is not as easy as it sounds. Lots of field names and lots
of tables. I have actually exceeded the maximum number of field
names in a table causing me to breakdown the data and create more
tables...
Two things:

1. you clearly have schema problems. If you'll post a description of
what you have I'm sure we can all help with making a better design,
which will likely involve breaking down that single spreadsheet into
a number of related tables. There's even a wizard to analyze your
data and do it for you, though I can't say I've ever found the
results helpful in getting to a final design (it usually misses
something important, and undoing that is harder than just doing it
manually in the first place).

2. walking through a bunch of records one-by-one and making changes
to them one-by-one is a procedural approach to data editing, and is
very inefficient. While doing so is necessary in a very few cases
where you need to make changes based on the context within a set of
records (i.e., the values you need in one record depend on the
values that are in other records in the same data set), in most
situations you should use SQL UPDATE queries to make the changes
instead. These will be far, far faster than changing the same
records sequentially. If you want to get into databases, you need to
learn SQL, so I would suggest that instead of just using the
sequential code that someone posted for you, try accomplishing the
task with an UPDATE query. The Access query designer is one of the
best tools for learning how to do this, as it makes it pretty darned
easy to create such queries.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 26 '07 #12

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

Similar topics

12
7724
by: jacob nikom | last post by:
Hi, I would like to store XML files in MySQL. What is the best solution: 1. Convert it to string and store it as CLOB/text 2. Serialize it and store as byte array 3. Flatten it out and create one column per element, each column is VARCHAR Does MySQL has anything special for XML data? Is there any software which helps to store XML data in MySQL
1
2637
by: Randy | last post by:
Access= 2002 I'm NOT a Programmer, but I have used VB in the past to do some things ( Spaghetti Code King) so I have some understanding of Coding I need to replace a text field (teacher) in Table (attendance) with a lookup fileld. the lookup field will point to a newly created table (teachers) the original DB was never intended to do the job that it is doing, but
8
1920
by: brian kaufmann | last post by:
Hi, I'm new to Access and this may be a basic question but I would appreciate it if you could let me know how to do this: I've created an Access table and would like to insert a column with the field name "name" and to put the same word "unknown" down all the rows of the column. How could this be done both in the design mode and in sql code?
5
2491
by: JonH | last post by:
Ok, I have this dynamically created table in my one of my php forms that shows the names of the people the user has entered into a text field. When they hit add a row displays, showing the name they entered. Also, an image that allows them to delete shows beside the name upon creation. The delete removes the name from the table and pushes the other names to the top. Simple stuff, however, if I delete the last name displayed(the bottom of...
16
3499
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record in a hidden field) I wish the user to be able to edit the data in the table, so I have extracted the records into hiddenfield, textareas, dropdown list and checkbox so that they can make changes. I named these elements as arrays and wish to run an...
5
1828
by: eric.nguyen312 | last post by:
I have an amend button which when clicked puts the Job form into edit. When saved, Access backs up old job information into 'AmendedJobBackUp' table. What I want is to add a new column 'OldJobIndex' in the 'Job' table and have all amended 'JobIndex' stored in there. How would I go in doing this?
4
22571
by: Bob | last post by:
Hi all, I've got a table that I've imported and it has junk at the top of the table, so after import I run a delete query to remove the junk lines then I'm left with the field names I want for the table at the top of the table but the field names currently are 'field1' etc, so how do I rename the field names to the fields on the top row of the table. Cheers,
4
16703
prabunewindia
by: prabunewindia | last post by:
Hello everybody, here i am going to explain, how to get mails from Outlook express database and store in our own database(local) Initially you have to add the refference Outlook library10.0 or 11.0 from add ref. If you not find that, download the dll from here and install..click here open and windows application (or ASP.NET) in Form1 class code(declare) the following,
3
158
by: Daniel | last post by:
We have a MS Access Db that is on certain pc's within our locations.. so that comes out to be around 40+ databases.. ( old software ) each of those pc's dont have MS Access loaded on them( this is a good thing ) the software uses it.. For any new stores we open we have to go into the database to hardcode the location number, once that is in place, then the rest of the configuration is handled by the software.
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.