Add your own alternative version
Stats
338.2K views 5.2K downloads 130 bookmarked
Posted
22 Jul 2003
|
Comments and Discussions
|
|
I'd need an oracle_adaptor and sqlite_adaptor, would that be feasible ? And what would it entail? Looking at the mysql and mssql adaptors it doesn't look like much needs to be done there...
|
|
|
|
|
Hi
To make the tool evaluation easier, can you put a compiled version of this great tool including all dlls needed ?
Congratulations
|
|
|
|
|
hello!I found the sqlPP is very helpful to my work.I download the sqlpp_ide_01.zip and sqlpp_16.zip。With the section"Using it in your project",I can rebuild the project in sqlpp_ide_01.zip in my Vs.net2003 environment,but i can't rebuild the project in sqlpp_16.zip.The error is "SQLppNET fatal error LNK1181: can not open input file“lib_iobindd.lib”
" and "SQLppNET fatal error LNK1181: can not open input file“libsqlppd.lib.lib”
",why?What can i do?
|
|
|
|
|
Can the project be compiled with VC 6.0 or there is limitation on this compiler. If is possibile do u have the project file for VC 6.0?
Thanks and compliments for great works
|
|
|
|
|
I have not tried it with vc6 but I have great doubts it will work. Too broken compiler.
|
|
|
|
|
i can generate simple like
SELECT * FROM CLIENT
but
can not generate
SELECT .... FROM .... WHERE.....
any samples??
|
|
|
|
|
|
as follwing code
//=====================================================
portals= db->add_table("Portals");
portals->add_primary_key("PortalID");
portals->add_field("f1","nvarchar(60)");
portals->add_field("f2","nvarchar(60)");
portals->add_field("f3","nvarchar(60)");
portals->add_field("f4","nvarchar(60)");
portals->set_fixed(true);
modules= db->add_table("Modules");
modules->add_primary_key("ModuleID");
modules->add_field("ModuleTitle","NVARCHAR(256)");
modules->add_field("f1","NVARCHAR(256)");
modules->add_field("f2","NVARCHAR(256)");
modules->add_foreign_key(portals);
modules->set_fixed(true);
select_query_shared_ptr q = db->create_query();
q->add_table(db->get_table("Modules"),"M");
field_shared_ptr qf_cfn = modules->get_field("f1");
q->set_where(like(qf_cfn, "John%"));
cout << q->get_sql();
//=====================================================
it should generate following
SELECT * FROM Modules WHERE M.f1 LIKE 'John%'
but i got a compile error as following
error C3861: 'like': identifier not found, even with argument-dependent lookup
may i make a mistake??
With Best Regards
|
|
|
|
|
i build sqlpp well
but
i can not connect to ms sql server 2000
my code like following........
//================================================database_adaptor_shared_ptr mssql(new mssql_adaptor());
database_connection_shared_ptr con = database_connection::create("SQLPP","SQLPP","","dbo","Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sqlpp;PASSWORD=sqlpp;Initial Catalog=SQLPP;Data Source=192.168.1.21",mssql);
database_shared_ptr db = database::create(con);
select_query_shared_ptr q = db->create_query();
q->add_table( db->get_table("TTY") );
cout << q->get_sql();
//=================================================
|
|
|
|
|
Hi,
Could you to connect to your database using the osql tool ?
Jonathan de Halleux.
www.dotnetwiki.org
|
|
|
|
|
|
Check Sourceforge site to get the latest download.
- All the C# generation code has been updated for the C# code generator: code is better indented, better commented, etc... BIG CHANGES!
- Added View support
- Started to build components to add, select, explore data. Still beta
- MySql tested add (almost working). Still beta.
Jonathan de Halleux.
www.pelikhan.com
|
|
|
|
|
Hi...
For some strange reason, I have a IOException trying to run the SQLPPDemo project in VStudio.NET. (I use the 2.4 version)
What can it be?
Thks..
Nicolás
PD: I'm trying to use the library to make a generic query utility for the web, where you can join tables, add where clauses, etc, etc... But I still not understand well how to make simple queries like SELECT * FROM ... WHERE ..., ¿Does exist some example that can ilustrate it?
|
|
|
|
|
I suppose you mean in C# ?
As mentionned previously, the .net wrapper is not quite finished. So expressions are not wrapped yet
Do your problems still occur in 2.5?
Jonathan de Halleux.
www.pelikhan.com
|
|
|
|
|
Hi...
Thanks for you response.
Well.. I had tried the 2.5 version, but there is something that gives to me a IOException, so I have to use the 2.3 version.
See ya..
Nicolás
|
|
|
|
|
I think this class is very usefull;). However, commonly used db are missing. Will you support the oracle and ms access database? If yes, can you implement the function decode from oracle and its equivalent iif in ms access?
|
|
|
|
|
jmarcos wrote:
Will you support the oracle and ms access database?
Yes, it just a matter of writting the corresponding database adaptors. Unfortunaltely, I don't have Oracle, neither MsAcess so I can't do it myself.
jmarcos wrote:
If yes, can you implement the function decode from oracle and its equivalent iif in ms access?
Decode looks pretty much like "switch" case so this should be possible, do you have doc. on iif ?
Jonathan de Halleux.
www.pelikhan.com
|
|
|
|
|
iif function is in MSDN (I think it is a part of office doc), and also similar with foxpro or clipper iif function:
I think the syntax is:
iif(condition, true_value, false_value)
example use is:
Select Item_Code, iif(Item_Amount>1000, "Large", "Small") As Item_Size
From Orders;
Note: A "switch" case statement can be implemented in msaccess using nested "iif" function.
|
|
|
|
|
Excellent job! I am trying to use this lib, but my database needs the view. Could SQLpp support it?
|
|
|
|
|
Yes, I've implemented views. They will be in the next release, along with Design Time Control, MySql support, better naming conventions, etc...
Jonathan de Halleux.
www.pelikhan.com
|
|
|
|
|
Good!!!! When will you publish the new release?
BTW: After reading the code, I find the ids for the fields in the table are unique. But I can only get the field information throught the table object. Could SQLpp provide a function that allow me to get the field information by this unique id directly?
|
|
|
|
|
solidice wrote:
Good!!!! When will you publish the new release?
Today...
solidice wrote:
Could SQLpp provide a function that allow me to get the field information by this unique id directly
Yes of course... to help me keep track of such request, please go to the sourceforge site and post a "submit request". You can also track the sqlpp release from there.
Jonathan de Halleux.
www.pelikhan.com
|
|
|
|
|
|
I (think I) understand how to use add_table, add_primary_key and add_foreign_key for simpler tables, but what about EmployeeStores where a field is both a primary and foreign key?
|
|
|
|
|
I suppose this thread is related to the thread I answered in the other article.
You can use set_primary_key.
Jonathan de Halleux.
www.pelikhan.com
|
|
|
|
|
|
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
|