Subject Service Manager SPB (Parameter Buffer)
Author dve83
Hi, busy connecting to the service manager via the API.
According to Interbase 6 API Guide I need to prep the SPB with the following

isc_spb_version1
isc_spb_current_version
isc_spb_user_name
Length(6) of Username
username
isc_spb_password
Length(9) of password
password

my result in AnsiString looks likes this
#1#2#$1C#6'SYSDBA'#$1D#9'masterkey'

SPBLength = 21

this seems correct according to the spec in the API, however I keep getting the following Interbase message

' Invalid clumplet buffer structure: buffer end before end of clumplet - clumplet too long'

To me this means that either section 'username' or 'password' is beyond the length of the buffer.
HOWEVER, if I remove the isc_spc_current_version and decrease SPBLength by 1, all is good and the connection to Service Manager is made. What am I missing?