Support Forums

Full Version: Is there anyone here with a good knowledge working with Visual Basic + Access DB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey thank you so much for taking the time to help me. I studied your sample and tried applying some of the code you used to my project and it did work. But unfortunately that's not what I need... You see, your sample adds data to the database and reads data from the database which is then displayed in a messagebox. That worked well. But the functions I need are edit, save and display instead of add and read...

I uploaded a sample here if you would like to understand exactly what I'm trying to do. Thank you very much so far, before that I was trying to connect the database through the menus and commands and mixing it with code, it just wasn't working. In your sample you did it all in code, that itself helped me a lot, it's a good first step. Thanks. If you also know how to display data in textboxes, edit and save, I'd be extremely grateful. Thank you. ;)

Dam, sorry I never got back to you, been rather busy today.
If it's not sorted by tomorrow I'll try and help then. Smile
(04-25-2011, 03:24 PM)Psycho Mantis™ Wrote: [ -> ]That worked well. But the functions I need are edit, save and display instead of add and read...

Is there only four values you are dealing with here? Because it would just be a matter of changing the SQL statement to UPDATE the record instead of inserting a new record. And if there is only 4 values you could hard code the values you wish to load and update.

Ex. SQL to change the value at the index 1 might be:
Code:
UPDATE Table1 SET Column1 = 'Value 3' WHERE ID='1';

(04-25-2011, 03:57 PM)Untouch Wrote: [ -> ]Dam, sorry I never got back to you, been rather busy today.
If it's not sorted by tomorrow I'll try and help then. Smile
Thanks man, good to know =)

(04-25-2011, 04:48 PM)KoBE Wrote: [ -> ]Is there only four values you are dealing with here? Because it would just be a matter of changing the SQL statement to UPDATE the record instead of inserting a new record. And if there is only 4 values you could hard code the values you wish to load and update.
No my friend, the original project is much much more complex. But I'm just trying to find the "formula"/how to do, so that I can then apply to my real needs...

Tell me something, would that UPDATE statement save the changes to the database? And how about loading the data and displaying it in the textboxes?
Looked at a few programs I had and the one I was looking for wasn't there, well wasn't the finished version.
It must have been on my fried memory stick. Sad Can't remember, was so long ago but what Kobe said is right with the update statement and yes it will save changes to the database.

Are you using SQL though? I would have done it a different way.
(04-26-2011, 03:40 AM)Psycho Mantis™ Wrote: [ -> ]And how about loading the data and displaying it in the textboxes?

To display it in a textbox, using my example you would change
Code:
MessageBox.Show(row.Item("fldTest"))
to
Code:
TextBox1.Text = row.Item("fldTest")


And without knowing exactly what you need and how you are using the database.. then that is the best I can tell you. Basic SQL you will need:

UPDATE = edit
INSERT = new
SELECT = read

Once you run an UPDATE or INSERT query, the change is made.

(04-26-2011, 06:31 AM)KoBE Wrote: [ -> ]To display it in a textbox, using my example you would change
Code:
MessageBox.Show(row.Item("fldTest"))
to
Code:
TextBox1.Text = row.Item("fldTest")


And without knowing exactly what you need and how you are using the database.. then that is the best I can tell you. Basic SQL you will need:

UPDATE = edit
INSERT = new
SELECT = read

Once you run an UPDATE or INSERT query, the change is made.
okay I'll give it a try when I come back and then I'll leave some feedback. thanks
Use php as a medium, its realy easy to learn and then you can easily make a webapanel with it as all the functions/varibled are already defined.
Pages: 1 2