Click to See Complete Forum and Search --> : Writing to a database using SQL ...
stmartin
Jul 26th, 1999, 01:59 AM
I'm using a SELECT statement to get information from a database ... and it works.
NOW ... I can't figure out how to write the data back to the same database ...
HELP!!!!
What database are you using and are you trying to create a new table or update a table or what? More information needed.
Serge
Jul 26th, 1999, 03:13 PM
If you want to Insert new record to a database use:
Insert Into TableName (Field1, Field2, Field3) Values ('Value1', 2, True)
Where: Field1 is a string(text) data type, Field2 is Integer(number), Field3 is Boolean(YesNo)
If you want to update record in a database:
Update TableName Set Field1 = 'ValueHere', Field2 = False Where Field2 = 2
This will update one ore more records which have Field2 is equal to 2.
Look in the Help. It has many examples on practically all SQL statements.
Regards,
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
stmartin
Jul 26th, 1999, 06:06 PM
I'm using an Access database ... what I need to able to do is create another table and populate it with the information I'm selecting.
I have ComboBoxes, being populated with AddNew statements (which comes from a table called Transcripts). I'm doing this with an SQL Select statement .. where StudID is equal to ...whatever .. then the student courses are listed in the ComboBoxes .. Then I need to be able to write what has been selected in the ComboBoxes to a new table (called checksheet) in the database .. I would like to do this with an SQL Statement ...
Any Ideas ?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.