Database Basic Questions: New Records in Access/ODBC

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Database Basic Questions: New Records in Access/ODBC

Post by stephenmcnutt » Tue Oct 02, 2012 7:04 pm

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.

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Database Basic Questions: New Records in Access/ODBC

Post by Klaus » Tue Oct 02, 2012 8:07 pm

Hi Stepehen,
...but it's not EXPLAINED in the LiveCode User Guide.
Because Livecode <> SQL 8)

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

stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Re: Database Basic Questions: New Records in Access/ODBC

Post by stephenmcnutt » Tue Oct 02, 2012 8:15 pm

Thanks, Klaus, but what about the "Database Query Builder"? What is that and where can I find out more about it?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Database Basic Questions: New Records in Access/ODBC

Post by mwieder » Tue Oct 02, 2012 8:18 pm

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.

WarrenW
Posts: 27
Joined: Tue Oct 02, 2012 4:26 pm

Re: Database Basic Questions: New Records in Access/ODBC

Post by WarrenW » Tue Oct 02, 2012 8:27 pm

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

stephenmcnutt
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 107
Joined: Fri Nov 10, 2006 8:58 pm
Contact:

Re: Database Basic Questions: New Records in Access/ODBC

Post by stephenmcnutt » Wed Oct 03, 2012 6:24 pm

I don't know, Warren, but yes, I am doing this as a desktop app.

Post Reply