What about NpgsqlHelper and Transaction Control ?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/17/2005 9:59:21 AM
Gravatar
Total Posts 146

What about NpgsqlHelper and Transaction Control ?

Hello Joe.
I'm again. I'm sorry, I can see how many post I made ...

Ok, I want to know : what about the transacction control with database?.
In every command execution I can to see NpgsqlHelper, but I can't see surround between :

  • BeginTransaction
  • Commit
  • Or, Rollback.
In addition, I have looked for in google about NpgsqlHelper, and only two Link appeared.  Briefly, which is the secret of NpgsqlHelper?
12/17/2005 10:20:30 AM
Gravatar
Total Posts 18439

Re: What about NpgsqlHelper and Transaction Control ?

Currently mojoportal doesn't use transactions so no transactions have been included in the NpgsqlHelper. NpgsqlHelper was written by Joseph Hill for mojoportal, it is not part of the Npgsql library. When Joseph built NpgsqlHelper, he based it on the SqlHelper class in the MSSQL data layer of mojoportal. The MS SqlHelper class does have overloads with transaction support so if you look in there you may get an idea of how you can extend the NpgSqlHelper to support transactions. You would create similar methods in the NpgsqlHelper class but using the ado.net stuff for Npgsql. So if the Npgsql library supports transactions and I think it does, you could easily add support yourself in the NpgsqlHelper class.

mojoportal includes the source code for npgsql, but it is not the newest version. If the version in mojoportal doesn't support transactions you may want to check the newest version of npgsql http://pgfoundry.org/projects/npgsql

If you do implement those methods in NpgsqlHelper, please contribute them back to the project so that others can use it as well.

Hope that info helps.

Thanks,

Joe
12/27/2005 10:04:00 PM
Gravatar
Total Posts 73

Re: What about NpgsqlHelper and Transaction Control ?

Hi Romulo,

I think you should define your own library containing your business objects / business logic. Within that library you could handle your own transaction logic. You could test the functionality outside MojoPortal. You could use dOOdads from MyGeneration (www.mygeneration.com) or a suitable DAL component. Currently I am using MyGeneration, Before I used the DAL component from http://www.reflectionit.nl/DAL.aspx

 

You must sign in to post in the forums. This thread is closed to new posts.