home *** CD-ROM | disk | FTP | other *** search
-
-
- !AbtIbmDatabaseManager privateMethods !
-
- bindCallForDatabaseNamed: aDbNameString ifError: anErrorBlock
- "Send the DLL call to bind to aDbNameString. If error,
- execute anErrorBlock."
-
- | args sqlopt |
- ( self isTraceActive )
- ifTrue: [ self logTraceMessage: AbtDbmTraceBindDb
- with: aDbNameString ].
- (( sqlopt := self buildSqlOpt )
- at: 'options' subscript: 1)
- at: 'type' put: 1;"SQL_DATETIME_OPT"
- at: 'value' put: $3."SQL_DATETIME_ISO"
- sqlopt at: 'used' put: 1.
- args := Array new: 4.
- args
- at: 1 put: ((self bindFileFullNameFor: self bindFileName ) abrAsPSZ);
- at: 2 put: ('bind.msg' abrAsPSZ);
- at: 3 put: ( sqlopt abtAsExternalPassedPointer );
- at: 4 put: (self sqlca abtAsExternalPassedPointer ).
- self callPlatformFunction: IbmDbBindTo withArray: args
- useThreadPreference: false threadKey: self defaultThreadKey.
- ( self sqlcode = 0 )
- ifFalse: [ ^anErrorBlock value: ( self errorObjectForSqlca: self sqlca )].
- args at: 1 put: ((self bindFileFullNameFor: self bindFileSuppName ) abrAsPSZ).
- self callPlatformFunction: IbmDbBindTo withArray: args
- useThreadPreference: false threadKey: self defaultThreadKey.
- ^( self sqlcode = -33 )
- ifTrue: [ true ]
- ifFalse: [ self verifySqlcaIfError: anErrorBlock ]
- ! !
-