Home Source Code Repository
You have downloaded this file 0 times in the last 24 hours, limit is 0.
Your file downloads total 0 in the last 24 hours, limit is 0.

SmartSQL For REALbasic Download

Description:
SmartSQL is a class created by FreeVBCode.com. We've found this class extremely useful in Visual Basic so we decided to port it to REALbasic.

Overview

The SmartSQL class is designed to simplify the generation of SQL statements. In projects that require the use of complex SQL statements, developers sometimes have to use (often convoluted) if-then or select logic to concatenate and generate the statement. The SmartSQL class eases this process by allowing the developer to use properties and functions to set up the statement, instead of keeping track of a long string.

The class offers flexibility in terms of how to generate the statement. For example, the field list of a select statement can be specified by repeatedly calling the AddField method or by passing a list of field names as a paramarray or array to the AddFields method.

The class offers the ability to easily re-use aspects of a previously generated statement. For instance, the class allows a developer to easily modify the where clause of a previously generated SQL statement, while maintaining the table list, field list, join clause and/or order clause.

An Simple Example:

dim oSQL as new cSmartSQL

oSQL.SetupJoin "Customers", "ID", "Orders", "CustomerID", eClauseOp.Equal, eJoinType.Left

oSQL.AddFields "Customers.Name", "Customers.Phone", "Orders.ID", "Orders.ShippingAddress"

oSQL.AddSimpleWhereClause "Total", 1000, "Orders", eClauseOp.GreaterThan

oSQL.AddSimpleWhereClause "Customers.State", "CA"

MsgBox oSQL.SQL


The message box in the above example will display the following:

SELECT Customers.Name,Customers.Phone,Orders.ID,Orders.ShippingAddress
FROM (Customers LEFT JOIN Orders ON Customers.ID = Orders.CustomerID)
WHERE (Orders.Total > 1000) AND (Customers.State = 'CA');
Submitted By:
Bob Keeney (bob.keeney)
Submitted On:
16 Oct 2008
File Size:
303.91 Kb
Downloads:
520
License:
Any file redistribution MUST include the original SmartSQL.zip file from VBCode.net
File Version:
1.0
File Author:
Bob Keeney
File HomePage:
Click to visit site
File Date:
16 Oct 2008
Rating:
Total Votes:1
Comments:
Richard Munroe 2011-06-07 23:29:58 I've added LIMIT functionality. If you want to fold this in, let me know and I'll send you a copy.

Popular in last 30 days

Oct.08
Listbox Spreadsheet
17
A project by Seth Willits that shows you how to use the standard RB listbox as a spr...
Dec.11
INI I/O Class
9
A simple, fast class for loading and creating standard INI files. Supports Sections, ...
Oct.08
Custom Scrollbar Control
7
A project by Seth Willits that shows you how to make and use a custom scrollbar contr...
Oct.09
Printing Tutorial - REAL Reports
7
This tutorial has a brief introduction to Reporting in REALbasic using REAL Reports t...
Jun.09
Listbox Popup
6
This small example project shows you how to put a popup menu into a listbox making a ...
Oct.08
Snippets and Goodies
6
A project by Seth Willits that has miscellaneous snippets and goodies.
Aug.09
Statusbar
5
A statusbar is a fairly unobstrusive way to provide a user with information about wha...
Oct.08
UUID Generator
5
Realbasic Class for RFC 4122 UUIDs types 1, 3 & 4
Jan.11
Buffered Canvas
4
Jan.12
DatePicker
4
Pure RB code to display a calendar.

Newest Files

Jan.12
String Expression Evaluator
Evaluate arbitrarily complex algebraic functions from a RB String variable.  Functions can ...
Jan.12
DatePicker
Pure RB code to display a calendar.
Jan.12
RC4
Dec.11
INI I/O Class
A simple, fast class for loading and creating standard INI files. Supports Sections, Propert...
Nov.11
Open Document With Non-Default Application
Sep.11
StringBuilder
Jun.11
LinkLabel
Jan.11
Buffered Canvas
Jan.11
HTML scramble.rbp
Dec.10
Session Parameters

Most Downloaded

A project by Seth Willits that shows you how to use the standard RB listbox as a spreadsheet cont...

This tutorial has a brief introduction to Reporting in REALbasic using REAL Reports that was intr...

A project by Seth Willits that has miscellaneous snippets and goodies.

Reporting is the 'dark art' of programming because it involves three separate states for your app...

This small example project shows you how to put a popup menu into a listbox making a cell of type...

SmartSQL is a class created by FreeVBCode.com. We've found this class extremely useful in Visual ...

open office version of rsReports documentation in English. im sure there are some errors so lets...

An example project of how to implement a simple registration code into your application.

Based on the original tuturial and project files, this version has been updated to work with the ...

A sample project that shows how to create an auto complete editfield.