SQL

Coding + IDE + Code-Editor + Syntax + User-Functions + Anything else

SQL

Postby gbison » Mon Mar 25, 2013 8:04 pm

Is there any way to just execute straight SQL commands and retrieve data? It seems simpilar to me rather than using the prebuilt commands.

For example, lets say I have an SQLite database running and it has a table called Users and in that table are 3 columns called UID, Name, Active and UID is the primary
auto incremented key.

Again forgive my newbishness with programming SQL here put Im looking for something that will allow me to just execute querys and get a response.

Something like this....

Code: Select all
  Dim result as string

  result = Run("select * from Name where UID = 2")  'this would return the name associated with UID 2


The problem for me is that I cannot seem to understand what the language needs in order to do this. My database will be simple, nothing over the top, it will store nutritional information (Item Name, Calories, Fat, Carbs, Protein and such with a UID for each and a session number) However the process to get data seems convoluted to me, but perhaps its because I'm simply not understanding. Can someone give me a very simple example of executing a query and retrieving the string or integer data? :)
gbison
 
Posts: 9
Joined: Fri May 11, 2012 7:58 pm
Location: USA

Re: SQL

Postby berndnoetscher » Wed Mar 27, 2013 10:08 am

You did see the database examples shipped with q7b?
They are simple.
berndnoetscher
Site Admin
 
Posts: 344
Joined: Thu Mar 25, 2010 9:57 am

Re: SQL

Postby Henning » Fri Mar 29, 2013 2:37 pm

Hope this will help...

MySQLTest.zip
(2.67 KiB) Downloaded 156 times


/Henning
Henning
 
Posts: 522
Joined: Fri Aug 13, 2010 6:29 pm


Return to Questions & Answers

Who is online

Users browsing this forum: No registered users and 1 guest

cron