Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there anyone here with a good knowledge working with Visual Basic + Access DB?
#11
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. ;)

Reply
#12
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
[Image: burninglove4.png]
Reply
#13
(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';

Reply
#14
(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?
Reply
#15
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.
[Image: burninglove4.png]
Reply
#16
(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.

Reply
#17
(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
Reply
#18
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How To make an advanced Operating System in Visual Basic 2010 ? Mohamed Samir 9 12,590 01-15-2013, 09:30 PM
Last Post: Resistance
  [Visual Basic] FTP Uploader [Tutorial] Coding Support 6 3,042 08-12-2012, 12:36 AM
Last Post: Kenneth
  Visual Studio Bill Nye The Science Guy 1 1,043 03-19-2012, 09:08 AM
Last Post: BreShiE
  Visual Basic Guide - Buttons Death Demise 9 5,350 03-09-2012, 06:46 PM
Last Post: BreShiE
  Visual Basic Guides, Tutorials, Web Resources, and E-books Compilation simply_mark 1 1,801 11-16-2011, 06:30 AM
Last Post: TalishHF

Forum Jump:


Users browsing this thread: 1 Guest(s)