SQLite Server

Developed or developing a new product in PureBasic? Tell the world about it.
Q*bert
User
User
Posts: 27
Joined: Sat Dec 30, 2006 12:17 am
Location: Milwaukee, WI USA

Post by Q*bert »

Count me in as another interested user!
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

blueb wrote: I've downloaded the zip and will try it out.
The links above are for an old version which from memory wasn't multi-threaded and had a bug which could have caused a deadlock (although unlikely).

I will provide a link to the revised version soon.

weave.
CSAUER
Enthusiast
Enthusiast
Posts: 188
Joined: Mon Oct 18, 2004 7:23 am
Location: Germany

Post by CSAUER »

Send the files to me, and I will upload again.

It sounds interesting, that you are working on a ERP system. I do it conceptionally, too. I do programing a framework which interfaces the database systems (it comunicates to MySQL as well as SQLite, it has a user management with authorisation checks, logs changes, has a dictionary concept, provides multi-language interfaces, and a scripting language).

Maybe we can discuss via Email.

Cheers
Christian
Tipperton
Addict
Addict
Posts: 1286
Joined: Thu Jun 19, 2003 7:55 pm

Post by Tipperton »

the.weavster wrote:The SQLabs server you mentioned has been bought out by REALbasic and I believe it now only works with RB (and it's a ridiculous price).
Yesh.... try $500 USD for up to 5 concurrent connections and $1,500 for unlimited (currently at $999 introductory price).

Ouch! Looks like Real Software is getting greedy. RealBasic standard used to be $99, now it's $200. Professional used to be $400, now its $500.
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

You can now download the server and client library here:
http://www.oneledger.co.uk

Please also register with the forum:
http://www.oneledger.co.uk/forum/index.php
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

CSAUER wrote: It sounds interesting, that you are working on a ERP system. I do it conceptionally, too. I do programing a framework which interfaces the database systems (it comunicates to MySQL as well as SQLite, it has a user management with authorisation checks, logs changes, has a dictionary concept, provides multi-language interfaces, and a scripting language).

Maybe we can discuss via Email.

Cheers
Christian
Cool, my e-mail address is on the site above.
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

If you downloaded earlier today and are getting an error message from the server about a missing configuration file it's here: http://www.oneledger.co.uk/download/Config.asc.
Sorry about that.

The default password is 'password'.
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

I've found a nasty bug in the client library. When a large dataset is being returned data seems to go missing from the receiving buffer.

I know it's the client library that has the problem because I dont have the same issue with the REALbasic client classses. I guess I must me handling ReceiveNetworkData() incorrectly somehow.

Anyway rather than fix it I have published the protocol for communicating with the server here: http://www.oneledger.co.uk/s4sprotocol.html

I will have to comment out a function in the server that disguises the exchanged text so it's not human readable and recompile it. I will do that this weekend so it will be available for download next Monday or Tuesday.
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

Downloads are available again.

I've also made some changes which have made the server very much faster.
ankachen
User
User
Posts: 12
Joined: Tue Mar 27, 2007 2:52 am

Post by ankachen »

the.weavster wrote:Downloads are available again.

I've also made some changes which have made the server very much faster.
Do you provide any client program or who can provide one for using? Thanks
User avatar
the.weavster
Addict
Addict
Posts: 1576
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Post by the.weavster »

Hi ankachen,

I haven't created an example client in PureBasic but there is one available to download which was created with REALbasic.

If you're asking about a client library it's not necessary, you communicate with the server using delimited text and a tcp socket. I think in PB you'd use the SendNetworkData() and ReceiveNetworkData() commands. The protocol is here: http://www.oneledger.co.uk/s4sprotocol.html

Unfortunately I don't think PureBasic has a Split() or Join() command for turning delimited strings into arrays and vice versa.
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

Unfortunately I don't think PureBasic has a Split() or Join() command for turning delimited strings into arrays and vice versa.
don't think so either .. however i digged out some old code i wrote to fill an array from a string.

Maybe bit cludgy and you could simplyfy things but eh ... maybe helps:

Code: Select all

; Split String into Array

Dim myArr.String(6) 

;/ Args: *ptr2Array (l), String (s) , Delimeter (s)
Procedure Split2Arr(*MyArray.String,string.s,delim.s)
  Protected i.l, ArrSize.l
  ArrSize.l = PeekL(*MyArray - 8)
  For i.l = 0 To ArrSize.l 
    If i.l <= ArrSize.l
      *MyArray\s = StringField(string.s, i.l+1,delim.s) : *MyArray + 4
    EndIf
  Next  
EndProcedure
;/ Example

Split2Arr(@myArr(),"Hello I am a arrayed split string"," ")

Debug "0:"+myArr(0)\s
Debug "1:"+myArr(1)\s
Debug "2:"+myArr(2)\s
Debug "3:"+myArr(3)\s
Debug "4:"+myArr(4)\s
Debug "5:"+myArr(5)\s
Debug "6:"+myArr(6)\s
EDIT: stripped the struct i used for my project .. cleaner now ;)

Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

it is a little bit easier/clearer this way :

Code: Select all

;---------------------------------------------------------------------

Macro CountArray(array)
  PeekL(@array - 8) 
EndMacro

Structure arr_DataTypes
  StructureUnion
    b.b
    w.w
    l.l
    f.f
    s.s
  EndStructureUnion
EndStructure

Procedure Split2Array(userArray.arr_DataTypes(1), string.s, delim.s)
  
  Protected i.l, ArrSize.l = CountArray(userArray()) 
  
  For i = 1 To ArrSize 
    userArray(i-1)\s = StringField(string, i, delim) 
  Next 
  
EndProcedure

;---------------------------------------------------------------------

Dim myArr.arr_DataTypes(6)

Split2Array(myArr(), "Hello I am a arrayed split string"," ")

For i = 0 To CountArray(myArr()) - 1
  Debug Str(i) + ": " + myArr(i)\s
Next

;---------------------------------------------------------------------
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

also, here is a good old post ...
damn!! I must have skipped that one !! :lol: .. must.. read ... more !

Thanks Flype :)

Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
Post Reply