: : I want to be able to take TextBox.Text values and input them into my database... the tricky thing is that each text box will have its own column in the table. I would like to click a button like "Save" or something where all of the fields in those TextBox.Text will be saved to their appropriate column in ONE row as to represent one machine.
: :
: : Any thoughts? How do you bind a source from a TextBox to a column in a table? Or a Display Member as VB calls it.
: :
: : Tim
: :
:
: I guess you would use an SQL query to insert it into the Database.
: I know that there are a lot of controls that allow linking with a database, but I don't really know how to use them.
: I'm sorry but databases aren't my strong point.
: However, I suggest you Google for some examples on how to use databases with VB, or perhaps you can get a book about it.
:
:
: Best Regards,
: Richard
:
: The way I see it... Well, it's all pretty blurry
:
:
BitByBit_Thor is right. You have to read book about VB - Database programming. I can give a hint how to insert/update data in DB using data typed in Textbox. You may use INSERT or UPDATE SQL statement depennds on what are you going to do. If you need to save new data to DB, you have to use INSERT. In case old data must be updated, use UPDATE statement.
Example:
Dim strSQL as string
strSQL = "INSERT INTO tblAddress LastName,FirstName, Address _
& "VALUES (" & txtLastName.text & "," & txtFirstName.text & "," txtAddress.text & ")"
If you are going to use Stored procedure to add/update data in DB, you have to use Parameters to pass data from Front end to the SP. Anyway you have to learn a lot ...