in reply to Re: Re^2: Quote mark in string messing up mySQL INSERT
in thread Quote mark in string messing up mySQL INSERT

Or to be specific, FreeTDS hasn't yet implemented the API calls that are needed to handle placeholders at the protocol level.

It should be noted that although Sybase and MS-SQL both "speak" the TDS protocol the two companies have diverged significantly in the last few years, and handling of placeholders is different with MS-SQL (TDS version 7 and 8) compared to Sybase (TDS version 5).

Among other things Sybase has implemented a capability based negotiation functionality when the client and server first connect, which makes the protocol extensible without necessarily having to rev the protocol version. This is why DBD::Sybase calls ct_capability(CS_CAP_REQUEST, CS_REQ_DYN) to check if the server is capable of handling "dynamic" requests (i.e. placeholders). As this request doesn't exist in the MS version of the protocol the FreeTDS folks will have to emulate it (not too hard, probably).
But it's implementing the rest of the functionality that is needed to handle this stuff in a manner consistent with the way DBD::Sybase expects it to work that I think could be tricky.

I've been thinking for a while that it might be a good idea to create a DBD module that is more specific to FreeTDS and MS-SQL, instead of (or in addition to) trying to shoehorn DBD::Sybase into this function.

Michael

  • Comment on Re: Re: Re^2: Quote mark in string messing up mySQL INSERT