Returns the result of the action. The following properties are returned:
- .HasError = .T. if there was an error, .F. if the query was imported
- .ErrorText = contains the error text if there was an error
- .UserCancelled = .T. if the user cancelled before the import completed
A SQL::Connection object.
A SQL SELECT query that selects records from the target database.
The path and name of the local Alpha Anywhere .DBF table to create.
A SQL::TableInfo object. If you do not need to specify a value for this argument enter null_value().
Logical. Optional. Indicates whether to show a progress dialog. Default is .T.
Logical. Optional. Indicates whether the user is allowed to cancel the import before it has completed. Default is .T.
Logical. Optional. Indicates whether the local table should be added to the local Database (i.e. the .adb file). Default is .T. (If you don't need the table to be part of the local Database, you can save time by setting this flag to .F.)
If your query references any arguments, you can pass in values for these arguments. If you do not need to specify a value for this argument, enter null_value().
Import a SQL query into a DBF table. Optionally adds the table to the current database.
The SQL_QueryImport() function imports a table from a back-end SQL database into an Alpha Anywhere .DBF table.
dim cn as sql::connection dim cs as c cs = "Your connection string goes here" dim sqlquery as c sqlquery = "select * from customers where city = :whatCity" dim args as sql::arguments args.set("whatCity","London") dim flag as l flag = cn.open(cs) if flag = .f. then ui_msg_box("Error","Could not connect: " + cn.callresult.text) end end if dim resultP as p resultP = SQL_QueryImport(cn,sqlquery,"c:\data\customers.dbf",null_value(),.t.,.t.,.t.,Args)
Desktop applications only.