wwsql::Connect

Connects to a datasource via connection or connect string.

o.Connect(lcConnectString, llAsynch, llNoAutoTransactions)

Return Value

.T. or .F.

Parameters

lcConnectString
Pass either a DSN name or a full SQL connection string. This is the equivalent of either SQLConnect or SQLStringConnect in the VFP language.

When passing connection strings you can optionally omit the server= (defaults to . or local) and driver= attributes. All the following are valid connection strings:

driver={Sql Server};server=.;Database=WebStore;uid=webstore;pwd=secret
server=devserver;Database=WebStore
Database=WebStore

llAsynch
Optional - if .T. use Async requests against the connection. Default: .F.

llNoAutoTransactions
If set causes VFP to not use automatic transactions for commands. This can be faster. By default transactions are used for each batch.

Remarks

This routine sets several SQL properties globally.

SQLSetProp(0, 'DispLogin', 3)
SQLSetProp(0, 'DispWarnings', .F.)

* ** Map binary fields to BLOB/VarBinary
CURSORSETPROP("MapBinary",.T.,0)

See also:

Class wwsql

© West Wind Technologies, 2023 • Updated: 05/11/20
Comment or report problem with topic