Title: Re: [Firebird-devel] Learning the wire protocol
I can't help with this, but I know that the .NET provider and Jaybird are pure drivers (don't depend on fbclient), so if you understand Java or C#, you can take a look at their code and try to help from them.

[]s
Carlos
http://www.firebirdnews.org
FireBase - http://www.FireBase.com.br




Hello,

I'm looking at the wire protocol because I'd like to create a client library for PureBasic that doesn't require any middleware. Unfortunately the documentation looks a little sparse and even though I've downloaded protocol.h my limited understanding of C means I still need help. I hope some of you wont mind helping me with my newbie questions.

My first step is simply to try to connect, disconnect and read any confirmation/errors from the server's response.

My first question concerns the Indentification call and in particular the Database Path string, would I be right in thinking that should be a null terminated ascii string?

Then we have the user identification buffer, can I just skip that and include the user data in the following Attachment call?

Then we move on to the Attachment call and in particular the Database Parameter Buffer.

Once again are the database name, user name and password ascii strings? Would I be right in thinking the data to be added to the buffer would be formatted like this (hopefully PureBasic's syntax is so easy you'll get this even if you don't know PureBasic):

nLength = StringByteLength(myPassword$,#PB_Ascii)
*buffer = AllocateMemory(nLength + 2)
PokeS(*buffer,Chr(#isc_dpb_password),1,#PB_Ascii)
PokeS(*buffer,Chr(nLength),1,#PB_Ascii)
PokeS(*buffer,myPassword$,nLength,#PB_Ascii)

Obviously this is cut down and I'd need to include database, user name, etc... in the buffer but I really just want to know if I'm on the right track.

Thanks for any help you can offer (and I'm afraid I'll likely be back with more questions when I get to statements).

Steve.
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to