Database Basic Questions: New Records in Access/ODBC
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Livecode Opensource Backer
- Posts: 107
- Joined: Fri Nov 10, 2006 8:58 pm
- Contact:
Database Basic Questions: New Records in Access/ODBC
I'm brand new to databases and am having a hard time finding information. I'm using Microsoft Access with an ODBC connection. I've figured out how to connect to the database using revOpenDatabase, how to retrieve column names using revDatabaseColumnNames, and how to get the Access records to display in a dataGrid.
What I don't know how to do is put a new record INTO the Access database.
I've got two plain text fields and a pull-down (option) button. I'm trying to script a button to take these two fields, the info from the option button, and a timestamp of some sort and place them as a new record in the Access file.
I'm guessing this is done with an SQL query. I believe I learned today that while "query" sounds like I'm just GETTING information from the Access file, a query can also be used to put stuff IN the Access file. Right? Wrong?
So I think I need to know more about using SQL. There's a thing mentioned several times in the LiveCode User Guide called the Database Query Builder--some sort of tool, but it's not EXPLAINED in the LiveCode User Guide.
I really did look through all the posts in this forum--the titles anyway, but I couldn't find my answers. Thanks if you can help.
What I don't know how to do is put a new record INTO the Access database.
I've got two plain text fields and a pull-down (option) button. I'm trying to script a button to take these two fields, the info from the option button, and a timestamp of some sort and place them as a new record in the Access file.
I'm guessing this is done with an SQL query. I believe I learned today that while "query" sounds like I'm just GETTING information from the Access file, a query can also be used to put stuff IN the Access file. Right? Wrong?
So I think I need to know more about using SQL. There's a thing mentioned several times in the LiveCode User Guide called the Database Query Builder--some sort of tool, but it's not EXPLAINED in the LiveCode User Guide.
I really did look through all the posts in this forum--the titles anyway, but I couldn't find my answers. Thanks if you can help.
Re: Database Basic Questions: New Records in Access/ODBC
Hi Stepehen,
No it is just not possible to put everything that is somehow related to Livecode into the docs, like the gazillions of SHELL commands for example!
Check this one, that also got me started with SQL:
http://www.w3schools.com/sql/default.asp
Best
Klaus
Because Livecode <> SQL...but it's not EXPLAINED in the LiveCode User Guide.

No it is just not possible to put everything that is somehow related to Livecode into the docs, like the gazillions of SHELL commands for example!
Check this one, that also got me started with SQL:
http://www.w3schools.com/sql/default.asp
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 107
- Joined: Fri Nov 10, 2006 8:58 pm
- Contact:
Re: Database Basic Questions: New Records in Access/ODBC
Thanks, Klaus, but what about the "Database Query Builder"? What is that and where can I find out more about it?
Re: Database Basic Questions: New Records in Access/ODBC
The Database Query Builder is old and has been deprecated. It's still around in one of the obscure folders, but you'd be better off just ignoring it.
Check out the revExecuteSQL statement documentation for more about issuing SQL commands that are not queries.
Check out the revExecuteSQL statement documentation for more about issuing SQL commands that are not queries.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Database Basic Questions: New Records in Access/ODBC
Hi Stephen,
Are you doing this for a desktop app or what type? I'm new here and from what I understand is I cannot connect using ODBC with a mobile app. Is that right?
Thanks,
Warren
Are you doing this for a desktop app or what type? I'm new here and from what I understand is I cannot connect using ODBC with a mobile app. Is that right?
Thanks,
Warren
-
- Livecode Opensource Backer
- Posts: 107
- Joined: Fri Nov 10, 2006 8:58 pm
- Contact:
Re: Database Basic Questions: New Records in Access/ODBC
I don't know, Warren, but yes, I am doing this as a desktop app.