=> temporäre Tabelle
Die obigen Angaben werden im SQL durch die entsprechenden Pfade ersetzt!
Variant = My.Clients.SQL.SqlReadValue(tnDataSession AS INTEGER,tcSQLStatement AS STRING,tiValue AS Integer)
Variant = My.Clients.SQL.SqlReadValue(tnDataSession,tcSQLStatement,tiValue)
LOCAL lvValue AS Variant
lvValue = My.Clients.SQL.SqlReadValue(SET(DataSession"),[SELECT TOP 1 artnr,znr FROM CDBFDIR!B01 WHERE artnr LIKE 'SIE.3RT%' ORDER BY artnr])
? "artnr=",lvValue
lvValue = My.Clients.SQL.SqlReadValue(SET(DataSession"),[SELECT TOP 1 artnr,znr FROM CDBFDIR!B01 WHERE artnr LIKE 'SIE.3RT%' ORDER BY artnr],2)
? "znr=",lvValue
SqlTransaction() - Transaktion
Führt eine Transaktion aus
Rückgabe:[Boolean], Setzt den Transaktions- Status für den entsprechenden Daten-Server. 0 - Keine Transaktion oder Rollback, 1 - Beginn, 2 - End
Variant = My.Clients.SQL.SqlTransaction(tnDataSession AS INTEGER,tnTransaction AS INTEGER)
Variant = My.Clients.SQL.SqlTransaction(tnDataSession,tnTransaction)
SqlUpdate() - Update
Update eines Cursors
Update eines Cursors.
Die Tabelle(n) muss/müssen IMMER einen Primärschlüssel haben!
Variant = My.Clients.SQL.SqlUpdate(tnDataSession AS INTEGER,tcTable AS STRING,tcAlias AS STRING,tcIdName AS STRING,tcFilter AS String)
Variant = My.Clients.SQL.SqlUpdate(tnDataSession,tcTable,tcAlias,tcIdName,tcFilter)
*/ My wird vorausgesetzt!
IF My.Clients.SQL.SQLRead(SET("DataSession"),[SELECT * FROM CDBFDIR!B01 WHERE artnr LIKE 'SIE.3TH%'],"qB01")
*/ Ein Cursor wurde erstellt!
REPLACE ALL fparac1 WITH "PMS-"+TTOC(DATETIME()), __Changed WITH .T.
IF NOT My.Clients.SQL.SQLUpdate(SET("DataSession"),"B01","qB01")
=MESSAGEBOX(My.Clients.SQL.cLastError,64,"Fehler beim Update!")
ENDIF
ENDIF
SqlUpdateAll() - 'angegeben' Cursor Updaten
Rückgabe:[Boolean], Update mehrerer Cursor mit Transaktion! tcList := Tabelleninfo1#Tabelleninfo2#... Tabelleninfo := Table;Cursor;PrimaryKey[;Filter]
Update mehrerer Cursor mit Transaktion! tcList := Tabelleninfo1#Tabelleninfo2#... Tabelleninfo := Table;Cursor;PrimaryKey[;Filter]
Die Tabelle(n) muss/müssen IMMER einen Primärschlüssel haben!
Boolean = My.Clients.SQL.SqlUpdateAll(tnDataSession AS INTEGER, tcList AS STRING , toThermos AS OBJECT)
Boolean = My.Clients.SQL.SqlUpdateAll(tnDataSession,tcList,toThermos)
*/ Ein kleines Beispiel:
LOCAL llReturn AS Boolean
*/ Update der Cursor qB01 und qD03 in die Datenbank
llReturn = My.Clients.SQL.SqlUpdateAll(SET("DataSession"),"B01;qB01;IDB01#D03;qD03;IDD03")
SqlUpdateObject() - Object to Table
Ein Datensatz-Objekt updaten
Ein Datensatz-Objekt updaten
Die Tabelle(n) muss/müssen IMMER einen Primärschlüssel haben!
Variant = My.Clients.SQL.SqlUpdateObject(tnDataSession AS INTEGER,tcTable AS STRING,toRecord AS OBJECT,tcIdName AS STRING,tcFilter AS STRING)
Variant = My.Clients.SQL.SqlUpdateObject(tnDataSession,tcTable,toRecord,tcIdName,tcFilter)
*/ My ist bekannt...
LOCAL loB01 AS Object , llReturn AS Boolean
loB01 = My.Clients.SQL.SqlReadObject(SET("Datasession"),[SELECT TOP 1 * FROM CDBFDIR!B01 WHERE artnr LIKE 'SIE.3RT% ORDER BY artnr'],.F.)
IF loB01.__LastGet<>-1
*/ Dann haben wird hier die Datenstruktur der Tabelle B01
*/ Der dritte Parameter gibt an, ob die Spalten __Changed und __New enthalten sind...
WITH loB01 AS Object
.Notiz = "Notiz"
.__Changed = .T.
ENDWITH
llReturn = My.Clients.SQL.SQLUpdateObject(SET("Datasession"),"B01",m.loB01,"IDB01")
IF m.llReturn
=Messagebox("Update Ok!",64,"Info...")
ELSE
=Messagebox(My.Clients.SQL.cLastError,16,"Fehler...")
ENDIF
ENDIF
ToString() - String
Rückgabe:[String], wandelt den Inhalt einer Collection in einen String um
Wandelt den Inhalt einer Collection in einen String um.
String = My.Clients.SQL.ToString()
_Provider1 - ADODB Provider für VFP
SQL-ADODB-Provider für VFP-Tabellen OHNE Datenbank. Passend zu _Server1
String = My.Clients.SQL._Provider1
cIdx02 - Mandanten ID
Mandanten ID aus PMS32. Weist dem Pfadserver PMS_08.PmsPath den Mandanten zu. Setzen aller Pfade.
String = My.Clients.SQL.cIdx02
cLastError -
Letzte Fehlermeldung im Klartext
String = My.Clients.SQL.cLastError
cResetInfos - Reset
Wird benötigt, um GLOBAL Informationen zurückzusetzen. Je nach Klasse können die Informationen unterschiedlich sein!
String = My.Clients.SQL.cResetInfos
lWritelog - Write Log?
Mitschreiben eines Log's
Boolean = My.Clients.SQL.lWritelog
nCursorLocation - ADODB - Properties
Cursorlocation für ADODB.Connection
*/ adUseNone 1 OBSOLETE (appears only for backward compatibility). Does not use cursor services
*/ adUseServer 2 Default. Uses a server-side cursor
*/ adUseClient 3 Uses a client-side cursor supplied by a local cursor library. For backward compatibility, the synonym adUseClientBatch is also supported
Number = My.Clients.SQL.nCursorLocation
nCursorLocation1 - ADODB - Properties
Cursorlocation
*/ adUseNone 1 OBSOLETE (appears only for backward compatibility). Does not use cursor services
*/ adUseServer 2 Default. Uses a server-side cursor
*/ adUseClient 3 Uses a client-side cursor supplied by a local cursor library. For backward compatibility, the synonym adUseClientBatch is also supported
Number = My.Clients.SQL.nCursorLocation1
nCursorType - ADODB - Properties
Typ der Abfrage
*/ adOpenUnspecified -1 Does not specify the type of cursor.
*/ adOpenForwardOnly 0 Default. Uses a forward-only cursor. Identical to a static cursor, except that you can only scroll forward through records. This improves performance when you need to make only one pass through a Recordset. (RecordCount=-1)
*/ adOpenKeyset 1 Uses a keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible.
*/ adOpenDynamic 2 Uses a dynamic cursor. Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed, except for bookmarks, if the provider doesn't support them.
*/ adOpenStatic 3 Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible. (RecordCount=N)
Number = My.Clients.SQL.nCursorType
nCursorType1 - ADODB - Properties
CursorType
*/ adOpenUnspecified -1 Does not specify the type of cursor.
*/ adOpenForwardOnly 0 Default. Uses a forward-only cursor. Identical to a static cursor, except that you can only scroll forward through records. This improves performance when you need to make only one pass through a Recordset. (RecordCount=-1)
*/ adOpenKeyset 1 Uses a keyset cursor. Like a dynamic cursor, except that you can't see records that other users add, although records that other users delete are inaccessible from your Recordset. Data changes by other users are still visible.
*/ adOpenDynamic 2 Uses a dynamic cursor. Additions, changes, and deletions by other users are visible, and all types of movement through the Recordset are allowed, except for bookmarks, if the provider doesn't support them.
*/ adOpenStatic 3 Uses a static cursor. A static copy of a set of records that you can use to find data or generate reports. Additions, changes, or deletions by other users are not visible. (RecordCount=N)
Number = My.Clients.SQL.nCursorType1
nError - Fehlernummer d. Fehlers
Fehlernummer des letzten Fehlers.
Fehlernummer des letzten Fehlers.
Ist der Wert kleiner null, so handelt es sich um einen logischen Fehler.
Number = My.Clients.SQL.nError
WAIT WINDOW My.Clients.SQL.nError
nLine - Zeilennummer d. Fehlers
Zeilennummer, in der der letzte Fehler auftrat
Zeilennummer, in der der letzte Fehler auftrat
Number = My.Clients.SQL.nLine
WAIT WINDOW My.Clients.SQL.nLine
nLockType - ADODB - Properties
Welche Sperre?
*/ adLockUnspecified -1 Unspecified type of lock. Clones inherits lock type from the original Recordset.
*/ adLockReadOnly 1 Read-only records
*/ adLockPessimistic 2 Pessimistic locking, record by record. The provider lock records immediately after editing
*/ adLockOptimistic 3 Optimistic locking, record by record. The provider lock records only when calling update
*/ adLockBatchOptimistic 4 Optimistic batch updates. Required for batch update mode
Number = My.Clients.SQL.nLockType
nLockType1 - ADODB - Properties
LockType
*/ adLockUnspecified -1 Unspecified type of lock. Clones inherits lock type from the original Recordset.
*/ adLockReadOnly 1 Read-only records
*/ adLockPessimistic 2 Pessimistic locking, record by record. The provider lock records immediately after editing
*/ adLockOptimistic 3 Optimistic locking, record by record. The provider lock records only when calling update
*/ adLockBatchOptimistic 4 Optimistic batch updates. Required for batch update mode
Number = My.Clients.SQL.nLockType1
nMode - ADODB - Properties
Modus der Connection
*/ adModeUnknown 0 Permissions have not been set or cannot be determined.
*/ adModeRead 1 Read-only.
*/ adModeWrite 2 Write-only.
*/ adModeReadWrite 3 Read/write.
*/ adModeShareDenyRead 4 Prevents others from opening a connection with read permissions.
*/ adModeShareDenyWrite 8 Prevents others from opening a connection with write permissions.
*/ adModeShareExclusive 12 Prevents others from opening a connection.
*/ adModeShareDenyNone 16 Allows others to open a connection with any permissions.
*/ adModeRecursive 0x400000 Used with adModeShareDenyNone, adModeShareDenyWrite, or adModeShareDenyRead to set permissions on all sub-records of the current Record.
Number = My.Clients.SQL.nMode
nMode1 - ADODB - Properties
Zugriffsmode
*/ adModeUnknown 0 Permissions have not been set or cannot be determined.
*/ adModeRead 1 Read-only.
*/ adModeWrite 2 Write-only.
*/ adModeReadWrite 3 Read/write.
*/ adModeShareDenyRead 4 Prevents others from opening a connection with read permissions.
*/ adModeShareDenyWrite 8 Prevents others from opening a connection with write permissions.
*/ adModeShareExclusive 12 Prevents others from opening a connection.
*/ adModeShareDenyNone 16 Allows others to open a connection with any permissions.
*/ adModeRecursive 0x400000 Used with adModeShareDenyNone, adModeShareDenyWrite, or adModeShareDenyRead to set permissions on all sub-records of the current Record.
Number = My.Clients.SQL.nMode1
nRecords - Anzahl der Datensätze
Anzahl der betroffenen Datensätze
Number = My.Clients.SQL.nRecords
nSeconds - Zeit des SQL's
Verarbeitungszeit in Sekunden
Number = My.Clients.SQL.nSeconds
nWhatServer - Server
Wert:[Integer], Welcher Server wird angesteuert? 1- VFP Tabellen, 2 - VFP Tabellen über ADBO, ...
Wert:[Integer], Welcher Server wird angesteuert? 1- VFP Tabellen, 2 - VFP Tabellen über ADBO, ...
Number = My.Clients.SQL.nWhatServer
Siehe auch :
Hauptmenü /
Hauptindex /
Such Index /
Cursor Index /
Programm Module /
Tabellen Index /
Tabellenmodule /
Masken Index /
Programmcode Index /
Servicepacks /
My.Struktur /
Funktionen /
Sonstiges Index
Lokale Benutzerhilfe : Meine eigene Hilfe /
Zurück zur PMS32 - Hilfe
Dateiversion:1.0.04#3648 - H.U.DD#SSFF 02.12.2022
Senden Sie Ihren Kommentar zu diesem Thema an das Entwicklungsteam von PMS32
Weitere Informationen finden Sie unter der aktuellen
PMS32 WEB-Hilfe
Die Informationen dieser Mitteilung sind vertraulich und nur für Sie bestimmt. Unbefugtes Weiterleiten,
Veröffentlichen, Kopieren usw. sind untersagt und werden gerichtlich verfolgt.
© PMS Compelec GmbH 2022 ® el-Projekt