Difference between revisions of "DataControl.SQLQuery"

From Xojo Documentation

m
m
 
Line 9: Line 9:
 
{{Description
 
{{Description
 
|text = The SQL query used to obtain the default [[RecordSet]]. You can enter the default SQL query into the Properties pane. }}
 
|text = The SQL query used to obtain the default [[RecordSet]]. You can enter the default SQL query into the Properties pane. }}
 
  
 
==Example==
 
==Example==
 
 
 
This example gets all the rows from the “Movies” table in the database.
 
This example gets all the rows from the “Movies” table in the database.
 
 
<rbcode>
 
<rbcode>
  me.Database=database
+
Me.Database = database
  me.SQLQuery="Select * from Movies"
+
Me.SQLQuery = "SELECT * FROM Movies"
 
</rbcode>
 
</rbcode>

Latest revision as of 21:20, 25 October 2018

Property (As String )
aDataControl.SQLQuery = newStringValue
or
StringValue = aDataControl.SQLQuery

Supported for all project types and targets.

The SQL query used to obtain the default RecordSet. You can enter the default SQL query into the Properties pane.

Example

This example gets all the rows from the “Movies” table in the database.

Me.Database = database
Me.SQLQuery = "SELECT * FROM Movies"