Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » transactions and sql
transactions and sql [message #27860] Sat, 07 August 2010 01:20 Go to next message
mtdew3q is currently offline  mtdew3q
Messages: 101
Registered: July 2010
Location: Upstate, NY
Experienced Member
hi-

I'd like to use Firebird. I saw where that is probably possible with oledb. I think as long as there is a session I can do similar things to Postgres, MySql, etc.

My question is before proceeding is how do people handle transactions? In the manual tutorials and docs I didn't see any mention of it and I thought that it was strange as they were client/server db. If someone could tell me if it was available and in general where to look for tips that would be cool.

I can't get over how much easier the tutorials for this looked than IBPP. I noticed people mentioned the use of that for Firebird and that is the reason I am wondering. With IBPP you would might specify things like wait/no wait, snapshot (concurrency), write transaction and wrap the db code in a transaction. Or you could use something like read committed, no wait, read transaction if it was a select statement. Those are from memory. I hope the logic is ok.

I am going to try this new keyboard at home at work. I think it is the microsoft 4000. I hope IT looks the other way when I install it. I will ask the tech if he can not see me install it, so I dont have to cut through red tape to get my new keyboard.

have a very cool weekend -

Thanks,
3rdshiftcoder
Re: transactions and sql [message #27861 is a reply to message #27860] Sat, 07 August 2010 01:25 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 101
Registered: July 2010
Location: Upstate, NY
Experienced Member
oops --- the read tape comment was backwards Embarassed
Re: transactions and sql [message #27862 is a reply to message #27860] Sat, 07 August 2010 02:16 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 101
Registered: July 2010
Location: Upstate, NY
Experienced Member
I see now where transactions may be possible. I went searching through the header files after adding that package. I will experiment with it.


thanks
Re: transactions and sql [message #27863 is a reply to message #27860] Sat, 07 August 2010 03:03 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 101
Registered: July 2010
Location: Upstate, NY
Experienced Member
Hi-

I guess there must be some default set up like in Firebird there is a default transaction context for locking a record. If you want more fine grained control over some locking, I think you'd have to use IBPP and do it outside the Sql built-in framework context. Is that right? I read over the notes that compiled or prepared statements were fast and appreciate those comments. I was a little puzzled by the sequence of Firebird using the prepared statements. Something like clear cache rollback transaction execute dml and commit. I will just roll with it for now and see what happens. If I have this stuff pegged, what a cool set up that I can use this fancy dancy Sql framework with Firebird for my hobby mixed in with a little IBPP.

Have a cool day-
3rdshiftcoder

Re: transactions and sql [message #27869 is a reply to message #27860] Sun, 08 August 2010 08:12 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 101
Registered: July 2010
Location: Upstate, NY
Experienced Member
Hi-

I finally figured out what this post was talking about.


The one person was actually doing ddl stuff and the moderator got confused possibly thinking it was dml and so did I until i read it closer but it is a good tip to see how the ddl worked with firebird anyways.

I examined this a lot closer tonight and I do think it is definitely possible to mix U++ framework and IBPP. I was worried about transactions but I think the default read/write wait and snapshot/concurrency must be used for Firebird and any other transaction context can go through IBPP.

I don't think it would be hard to mix them because it looked to me that sql[0] which is Value Sql::operator[](int i) const {
Value v;
cn->GetColumn(i, v);
return v;
}

ends up when fetching data returning a value that i believe is output as a string according to this:



so that would make it easy to get data from U++ sql and use it in IBPP if I had to. i could also write stuff now that i know the probable access mode is read/write.

i don't think i have to worry about switching to zeos db controls anymore. this looks like it is very cool. i hope my brain cooperated with me on this one.

thanks,
Jim
Re: transactions and sql [message #27870 is a reply to message #27869] Sun, 08 August 2010 08:18 Go to previous messageGo to next message
mtdew3q is currently offline  mtdew3q
Messages: 101
Registered: July 2010
Location: Upstate, NY
Experienced Member
<snip>

I am really sorry about the extra post. My link button didnt work. I included the url in text below. I will have to see if there is an option in my account to fix the hyperlink button for the forum.

"I finally figured out what this post was talking about.

http://www.ultimatepp.org/forum/index.php?t=msg&th=4119& amp;start=0&
"

AND

"ends up when fetching data returning a value that i believe is output as a string according to this:

http://www.ultimatepp.org/src$Sql$SqlRaw$en-us.html
"

Re: transactions and sql [message #28022 is a reply to message #27860] Fri, 13 August 2010 11:06 Go to previous message
mirek is currently offline  mirek
Messages: 11991
Registered: November 2005
Ultimate Member
[quote title=mtdew3q wrote on Fri, 06 August 2010 19:20]hi-

I'd like to use Firebird. I saw where that is probably possible with oledb. I think as long as there is a session I can do similar things to Postgres, MySql, etc.

My question is before proceeding is how do people handle transactions?


SqlSession::Begin()
SqlSession::Commit() / SqlSession::Rollback()

As single main database session is usually represented as 'SQL':

SQL.Begin()
SQL.Commit() / SQL.Rollback()
Previous Topic: How to make complex indexes?
Next Topic: Prefix to prevent name clash in SQL: SqlId, variables, tables, ...
Goto Forum:
  


Current Time: Thu Aug 22 17:52:22 CEST 2019

Total time taken to generate the page: 0.00989 seconds