Re: [sqlite] Embedded SQL in C
> --- Leif Jensen <[EMAIL PROTECTED]> wrote: > > I thought about the "fake" library myself > > even though our project is more like 20 - 30k lines, but I'm not sure > > how bad it would be. Another easy way to embed is to use embedded C/C++ Ch. All sqlite APIs are already supported in Ch and they can run in C/C++ interpreter Ch without compilation. You can use embedded Ch and then call all sqlite APIs. Ch Sqlite is open source and freely available from http://chsqlite.sourceforge.net/ More about Embedded Ch can be found at: http://www.softintegration.com/products/sdk/embedch/ http://www.softintegration.com/support/faq/embed.html http://www.softintegration.com/solution/embedded/ Peter > May not be worth the hassle given the size of your project. > > Since you're using C, consider rewriting your code using TrollTech's Qt > library so you could hook up any database for which they've written a driver. > There may be other multi-database libraries for C/C++. > - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Embedded SQL in C
We have an application server which incorporates Sqlite. It implements a proprietary language to generate embedded server pages and these use regular embedded SQL compiled into the executables. It also has a remote procedure call interface which accesses a repository of SQL using embedded SQl syntax bound to variable names in Javascript running in browsers. To implement a preprocessor which intercepts SQL in a C program and embeds calls to the Sqlite API would provide what you want. The Sqlite Bind call seems to have been implemented in such a way as to facilitate embedded SQL. Leif Jensen wrote: That sounds very interesting. Could you please elaborate a little more on that ? Leif John Stanton wrote: The Sqlite BIND capability makes implementing an embedded SQl interface quite a simple operation. We use embedded SQL with Sqlite but do it within a proprietary language. It was almost trivial to implement. Leif Jensen wrote: Hi, In a larger project we are using PostgreSQL database and Embedded SQL in C (using ECPG) in a server daemon. We would like to be able to have this to work with SQLite for a stand-alone application. The Embedded SQL in C standard is as used by Oracle (and former Informix) and of course PostgreSQL. Does anyone know of an Embedded SQL in C (pre-compiler/interface) that will work with SQLite ? Leif - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Embedded SQL in C
--- Leif Jensen <[EMAIL PROTECTED]> wrote: > I thought about the "fake" library myself > even though our project is more like 20 - 30k lines, but I'm not sure > how bad it would be. May not be worth the hassle given the size of your project. Since you're using C, consider rewriting your code using TrollTech's Qt library so you could hook up any database for which they've written a driver. There may be other multi-database libraries for C/C++. Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. http://new.toolbar.yahoo.com/toolbar/features/norton/index.php - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Embedded SQL in C
That sounds very interesting. Could you please elaborate a little more on that ? Leif John Stanton wrote: The Sqlite BIND capability makes implementing an embedded SQl interface quite a simple operation. We use embedded SQL with Sqlite but do it within a proprietary language. It was almost trivial to implement. Leif Jensen wrote: Hi, In a larger project we are using PostgreSQL database and Embedded SQL in C (using ECPG) in a server daemon. We would like to be able to have this to work with SQLite for a stand-alone application. The Embedded SQL in C standard is as used by Oracle (and former Informix) and of course PostgreSQL. Does anyone know of an Embedded SQL in C (pre-compiler/interface) that will work with SQLite ? Leif - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Embedded SQL in C
The Sqlite BIND capability makes implementing an embedded SQl interface quite a simple operation. We use embedded SQL with Sqlite but do it within a proprietary language. It was almost trivial to implement. Leif Jensen wrote: Hi, In a larger project we are using PostgreSQL database and Embedded SQL in C (using ECPG) in a server daemon. We would like to be able to have this to work with SQLite for a stand-alone application. The Embedded SQL in C standard is as used by Oracle (and former Informix) and of course PostgreSQL. Does anyone know of an Embedded SQL in C (pre-compiler/interface) that will work with SQLite ? Leif - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Embedded SQL in C
Thank you for your ideas. I thought about the "fake" library myself even though our project is more like 20 - 30k lines, but I'm not sure how bad it would be. I'm aware of the SQL dialects, but we have tried to make a point of using "standard" SQL syntax. Of course we might have to develop some triggers/functions that are not available in SQLite at the moment. I was hoping someone had already done something along these lines before. Leif Joe Wilson wrote: --- Leif Jensen <[EMAIL PROTECTED]> wrote: In a larger project we are using PostgreSQL database and Embedded SQL in C (using ECPG) in a server daemon. We would like to be able to have this to work with SQLite for a stand-alone application. The Embedded SQL in C standard is as used by Oracle (and former Informix) and of course PostgreSQL. Does anyone know of an Embedded SQL in C (pre-compiler/interface) that will work with SQLite ? I am not aware of such a pre-compiler for SQLite. If your project is quite large (100,000+ lines of code) then porting PostgreSQL's embedded C compiler ECPG to SQLite may be a viable alternative. http://doxygen.postgresql.org/dir_45ac211730e8147f7f879781af2b8b2a.html The main porting effort would be in the ecpglib/ directory, mapping all PQ-prefixed postgres functions and the PG-prefixed data structures to their SQLite equivalents. http://doxygen.postgresql.org/dir_9bd0bfe8893f57601e39e3093fd54938.html A possibly simpler approach may be to construct a "fake" libpq library for use by the PostgreSQL ECPG program that does all the mappings to/from sqlite3. You'd only have to support the subset of libpq functions actually used by ECPG. But even if you did such a port using either approach, be aware that the SQL dialects of Postgres and SQLite are not the same - you'd likely have to change some of the embedded SQL statements in your code. Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Embedded SQL in C
--- Leif Jensen <[EMAIL PROTECTED]> wrote: >In a larger project we are using PostgreSQL database and Embedded SQL > in C (using ECPG) in a server daemon. We would like to be able to have this > to work with > SQLite for a stand-alone application. The Embedded SQL in C standard is > as used by Oracle (and former Informix) and of course PostgreSQL. > >Does anyone know of an Embedded SQL in C (pre-compiler/interface) > that will work with SQLite ? I am not aware of such a pre-compiler for SQLite. If your project is quite large (100,000+ lines of code) then porting PostgreSQL's embedded C compiler ECPG to SQLite may be a viable alternative. http://doxygen.postgresql.org/dir_45ac211730e8147f7f879781af2b8b2a.html The main porting effort would be in the ecpglib/ directory, mapping all PQ-prefixed postgres functions and the PG-prefixed data structures to their SQLite equivalents. http://doxygen.postgresql.org/dir_9bd0bfe8893f57601e39e3093fd54938.html A possibly simpler approach may be to construct a "fake" libpq library for use by the PostgreSQL ECPG program that does all the mappings to/from sqlite3. You'd only have to support the subset of libpq functions actually used by ECPG. But even if you did such a port using either approach, be aware that the SQL dialects of Postgres and SQLite are not the same - you'd likely have to change some of the embedded SQL statements in your code. Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. http://tv.yahoo.com/collections/222 - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Embedded SQL in C
Hi, In a larger project we are using PostgreSQL database and Embedded SQL in C (using ECPG) in a server daemon. We would like to be able to have this to work with SQLite for a stand-alone application. The Embedded SQL in C standard is as used by Oracle (and former Informix) and of course PostgreSQL. Does anyone know of an Embedded SQL in C (pre-compiler/interface) that will work with SQLite ? Leif - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Sqlite Server
There is no Sqlite Server unless you use a third party product. Sqlite is a library which links into your application. noname wrote: I am using SQL Server as a back end in my vb6 application i want to switch over to sqlite server but terrainformatica.com site has not provided rates for server. so i am confused that should i use it or not i enquired on sites also but i am getting proper answer from them. My application process huge data of hospital. please suggest me that what i should do may i can waint for SQlite server or suggest me other server like SQLite server on which Developer licence are available. My client should not need to purchase back end. arvind parmar [EMAIL PROTECTED] - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Sqlite Server
You can use our free XCopy-deployable dhRPCServer for this purpose (using our dhSQLite-COM-Wrapper at the server- and the clientside). Both components are designed, to work together as optimal as possible. The App-Server has a (runtime-) adjustable ThreadPool and can serve up to 1 COM- Requests per second (in case of a simple String-Reflection). Regarding (Read/Write) SQLite-Access the COM-based dhSQLite-Wrapper is used on both, the server- and the clientside. An SQLite-Request then goes as follows: After establishing a connection to the AppServer, the client sends an RPC-COM-Request to a serverside DLL. 'gets the serialized content of a serverside Recordset strSQL = "Select * from Table" ByteArray = RPCConn.DoRPC("DBServer.dll", "classSQLite", "GetRecordset", _ TimeOutSeconds, strSQL) Set ClientRs = New dhSQLite.cRecordset ClientRs.Content = ByteArray Now you can use this disonnected clientside Recordset in your Application and add new records, delete records, change records, or sort records on it. If you want to save your changes from this recordset on the serverside you will have to do the following: ByteArray = ClientRs.ContentChangesOnly RPCConn.DoRPC "DBServer.dll", "classSQLite", "UpdateBatch", _ TimeOutSeconds, ByteArray At the serverside (in DBServer.dll, classSQLite, method UpdateBatch): Set Conn = GetSQLiteConnectionFromPool() Set Rs = New dhSQLite.cRecordset Set Rs.ActiveConnection = Conn Rs.Content = ReceivedByteArray Rs.UpdateBatch Due to the fast serialization/deserialization-routines in our SQLite- Wrapper (and of course the fast performing SQLite-engine itself), we can reach up to 500 "midrange-SQLite-Selects" per second (encrypted and compressed) from concurrent clients (server running on a cheap Athlon-X2-processor) and can easily drive a 100MBit-LAN into its limits. Try it out, there is a Binary Demo on our site, containing the server-part (including the sqlite-engine and our wrapper) and a DB-Demo-Client, wich can be used for MultiUser-Stress- Tests. There's no setup needed, neither for the serverpart, nor for the client-demo - all is working with registryless COM- components "out of the box", leaving no traces in your Win-registry. In a second ZIP you will find VB6-Sources for both parts (Client- and Server-Part). http://www.thecommon.net/8.html Olaf Schmidt noname wrote: > > I am using SQL Server as a back end in my vb6 application i want to switch > over to sqlite server but terrainformatica.com site has not provided rates > for server. so i am confused that should i use it or not i enquired on > sites also but i am getting proper answer from them. My application > process huge data of hospital. please suggest me that what i should do may > i can waint for SQlite server or suggest me other server like SQLite > server on which Developer licence are available. My client should not need > to purchase back end. > > > arvind parmar > [EMAIL PROTECTED] > > -- View this message in context: http://www.nabble.com/Sqlite-Server-tf3823853.html#a10825872 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re: Re: Re: COLLATE without ORDER BY?
Thanks Igor, A custom function was exactly what I needed :-) Best regards, Jonas On 5/25/07, Igor Tandetnik <[EMAIL PROTECTED]> wrote: Jonas Sandman <[EMAIL PROTECTED]> wrote: >> ext1 is one type of extension, in my case 'mp3'. I guess it doesn't >> make > sense when you have only one, but potentially there can be a lot more > there. ('mp3', 'ogg', 'flac') etc... And how exactly do you plan to specify such a list in a parameter? > Unfortunately, "COLLATION STRIP_ACCENT LIKE" doesn't seem to trigger > anything either. First, it's "COLLATE", not "COLLATION". Second, LIKE doesn't use collations. Note that a collation doesn't convert one string to another, it just tells how two strings should be ordered. This information is useless to LIKE. What you probably want is a custom function, not a custom collation. A function would take a string and return another string, with accents removed. You can then use it like this: select * from tableName where StripAccents(field) = value; Igor Tandetnik - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Sqlite Server
Seems like you haven't even bothered to look at the SQLite website. Here are a few hints -- - There is no such thing as a "SQLite server" - There is no such thing as a "SQLite server Developer licence" Rest of the answers are readily available on www.sqlite.org. You should spend about 30 mins looking at the different parts of the website and learning about SQLite. That should be enough to tell you everything you want to know. You should definitely NOT make a decision for your client based only on replies to your question on a mailing list. On 5/27/07, noname <[EMAIL PROTECTED]> wrote: I am using SQL Server as a back end in my vb6 application i want to switch over to sqlite server but terrainformatica.com site has not provided rates for server. so i am confused that should i use it or not i enquired on sites also but i am getting proper answer from them. My application process huge data of hospital. please suggest me that what i should do may i can waint for SQlite server or suggest me other server like SQLite server on which Developer licence are available. My client should not need to purchase back end. arvind parmar [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Sqlite-Server-tf3823853.html#a10825295 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] - -- Puneet Kishor http://punkish.eidesis.org/ Nelson Inst. for Env. Studies, UW-Madison http://www.nelson.wisc.edu/ Open Source Geospatial Foundation http://www.osgeo.org/education/ - collaborate, communicate, compete = - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Sqlite Server
I am using SQL Server as a back end in my vb6 application i want to switch over to sqlite server but terrainformatica.com site has not provided rates for server. so i am confused that should i use it or not i enquired on sites also but i am not getting proper answer from them. My application process huge data of hospital. please suggest me that what i should do may i can waint for SQlite server or suggest me other server like SQLite server on which Developer licence are available. My client should not need to purchase back end. arvind parmar [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Sqlite-Server-tf3823854.html#a10825296 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Sqlite Server
I am using SQL Server as a back end in my vb6 application i want to switch over to sqlite server but terrainformatica.com site has not provided rates for server. so i am confused that should i use it or not i enquired on sites also but i am getting proper answer from them. My application process huge data of hospital. please suggest me that what i should do may i can waint for SQlite server or suggest me other server like SQLite server on which Developer licence are available. My client should not need to purchase back end. arvind parmar [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Sqlite-Server-tf3823853.html#a10825295 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] -