Posted on 06/12/2007 09:47:10
NP wrote:
pl@xtendit.dk wrote:
1) I'm not sure I remember this correctly or not, but is it correct that (seen from code like a custom module for example) it makes no difference if the solution is using SQL Server or Access... The code would still be the same?
2) Also, if the above is correct then how about using transactions, is this available when communicating through Dynamicweb.Database or should a real SqlConnection, SqlCommand etc. be used?
3) Futhermore, the web interface for SQL Server, where is that located for solutions using SQL Server?
1) Yes - Dynamicweb uses OLEDB if on access and SQLClient if running on SQL-Server. Just make sure you use Database.SqlDate(now) and Database.SqlBool(True) when using dates and booleans in your queries.
2) Transactions are not available everywhere, but you can execute long running deletes etc with
Database.ExecuteNonQuery() using transactions - it has a bollean you can set so it will use transactions if possible (running SQL-Server)
3) Please ask this question in support (Case system). I think they need to create a user for you first.
About (2), this means that the following wold not work?
---------------------------
IDbConnection con = Dynamicweb.Database.GetConn();
IDbTransaction trans = con.BeginTransaction();
IDbCommand cmd = con.CreateCommand();
cmd.Transaction = trans;
...
...
...
trans.commit();
// or, on error
trans.Rollback();
---------------------------
This works in general using SqlConnection, SqlCommand etc. when coding for SQL Server.