Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Wed Nov 22, 2017 8:52 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Can anyone help me get started with SQL?
PostPosted: Mon Jun 03, 2013 11:17 am 
Offline

Joined: Fri Dec 21, 2007 9:50 am
Posts: 243
Hi All -

So I'm finally getting around to modifying a project I've been working on for awhile (I've mentioned it in some other threads).

Essentially, I'm working on a stock market model where I use information from a given day and compute values for a given list of stocks and then simulate trading. I designed the program to run on a 3 dimensional array, DATA(i,j,k) where i was the timestep, j was the stock, and k was a given value for that stock on that day. I had this program running on a small .csv file but, to my dismay, when I expanded the number of days of information and the number of stocks the program was unable to create an array large enough.

Long story short - I've created a database from a .csv file and I'm sort of struggling with how to interact with the database (I'm not familiar with SQL). I was wondering if there was any sort of tutorial on using SQL in RB?

Specifically, if I think of my data in terms of having indices i x j x k (as I did in array(i,j,k)) I wanted to have a listbox that displays the j x k information for a given i and then when the user clicks a pushbutton, i is iterated by 1 and the new j x k data is displayed. I'm just not sure the most efficient way to populate the cells of the listbox from the database. That would probably be a good start.

Thanks all.


Top
 Profile  
Reply with quote  
 Post subject: Re: Can anyone help me get started with SQL?
PostPosted: Mon Jun 03, 2013 11:52 am 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
It is always difficult to use one language (sql) inside of another language (RB). So it will be very important for you to learn sql apart from RB - or at least the portions of sql you're going to be using. Download a query browser tool and start interacting with your database in the "native" environment. Then bring what you've learned into the RB environment.

There are many good online tutorials for sql. Just don't try to mix in RB until you're familiar with sql. It will save you a ton of frustration.


Top
 Profile  
Reply with quote  
 Post subject: Re: Can anyone help me get started with SQL?
PostPosted: Mon Jun 03, 2013 12:22 pm 
Offline

Joined: Fri Dec 21, 2007 9:50 am
Posts: 243
timhare wrote:
It is always difficult to use one language (sql) inside of another language (RB). So it will be very important for you to learn sql apart from RB - or at least the portions of sql you're going to be using. Download a query browser tool and start interacting with your database in the "native" environment. Then bring what you've learned into the RB environment.

There are many good online tutorials for sql. Just don't try to mix in RB until you're familiar with sql. It will save you a ton of frustration.

Ok. Thanks for the tip. I knew SQL was used within several other languages but I didn't realize SQL was stand-alone.


Top
 Profile  
Reply with quote  
 Post subject: Re: Can anyone help me get started with SQL?
PostPosted: Tue Jun 04, 2013 6:05 am 
Offline
User avatar

Joined: Sun Oct 28, 2012 4:54 am
Posts: 264
Location: Herts, UK
For SQL express and SQL Server i have found the SQL Maestro Tools very good for both the Novice and Pro. Has a very good visual query designer too.

http://www.sqlmaestro.com/

Also you may like to take a look at CubeSQL if SQLite is an option for you.

http://www.sqlabs.com/cubesql.php

_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group