Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Need serious help with data conection problem

Posted on 2002-04-29
4
136 Views
Last Modified: 2010-05-02
I a currently writing a program for my final year project and have hit a number of major stumbling blocks.

the first problem is that I have 6 combo boxes with different names propagating (adding items) from the same database table. When I select a name from one combo box and then try to select a name from a different box the program throughs an error that is not reconised by the MSDN help files.

What I am trying to do is using curtin criteria add the aproprate names to each of the 6 boxes, it dose this ok. then the useser should be able to select a name from each combo box and click a button to store them to a seperate database table. At present I can not select from one box before it throws an error.

Dose anyone have any ideas what is wrong and how to fix it. I can send you the code if you wish to try.


==========  EXTRA bit ===========

By the way there are more points on offer(aprox:1000 or more) if someone out there can help me get the whole program working properly before the deadline of the 15th of may. A full explenation of the program will be given and a list of the final few bugs that need sorted.  Incase any of you are wondering I am not cut out to be a programmer but will fail my degree if I dont get this working and I have worked so hard over the last few years to get betten by something I have never been taught about. non of my lectures can help so this is my last hope.
 
if you are interested in helping with the extra bit please leave me a message with a contact for you and the line "I am willing to help".  
I know this is cheeky but I am so desperate and  and thing is a try.

=================================================

0
Comment
Question by:Karen-Ann
  • 2
4 Comments
 
LVL 1

Expert Comment

by:jmgs082598
ID: 6978370
Could you pls put the CODE, in order to check it.
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6978630
There are two different approaches to reading and writing information to the database.  One is the "bound" approach, and another is the "unbound" approach.

Most people start out trying to use Data Controls and the Bound approach.  This is fine, as it requires miminal coding, but often it can cause strange problems.  My preference is for the "unbound" approach, but this requires a lot more code.

My guess is that you are using a data control (if so, are you using an ADODC data control or a DAO data control?)

And, you are setting the DataSource  property of a list or combo box to the name of the data control, and the DataField property of the combo or list to the field name which is the source of the list.

The problem is if you are trying to set several combo boxes/list boxes on the form to the same datafield, the data control is going to get very confused about which combo/list to use when updating the data in the data control (because bound controls automatically update the DB when you move from one record to the next).

Instead of using standard listboxes or combo boxes, you need to use the Microsoft DataBound List control.  You would use this in combination with two data controls on your form.  One data control would be set to the table and field that you want to use to populate the lists.  The other data control would be set to the table and columns that you want to update.

Then, in the Databound List Control you can set different DataSources/DataFields for the List, and "bind" the control to update another datasource/datafield.  To set the proper values, click on the property called DataBindings in the DataBound list's property box.
0
 
LVL 3

Expert Comment

by:n_narayanan
ID: 6979456
Send me your project to n_narayanan@yahoo.com

I will modify and send it to you.

Cheers

Narayanan.
0
 
LVL 3

Accepted Solution

by:
n_narayanan earned 200 total points
ID: 6996190
I have modified a little bit and sent it to you.

Can you confirm?

Thanks

Narayanan
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question