SqlGetPacket%

Returns the tabular data stream (TDS) packet size currently in use.

Syntax

SqlGetPacket% ( sqlconn% )

where

sqlconn%
A SQL Server connection. The value of sqlconn% is returned by SqlOpen%.

Returns

The TDS packet size currently in use.

Remarks

To determine the TDS packet size in use, an application should call SqlGetPacket% after SqlOpen%.

You can change the TDS packet size by using SqlSetLPacket%, which sets the packet size field in the login record.

If the call to SqlGetPacket% fails (for example, when sqlconn% is null), SqlGetPacket% returns 0. Other than the failure case of 0, however, the call should never return less than 512 bytes.

See Also

SqlSetLPacket%