Please let me know when do we require to call the method connection.rollback();
try{
connection = getConnection();
connection.setAutoCommit(false);
pstmt1 = connection.preparedstatement ( ... );
...
pstt1.executeUpdate();
pstmt2 = connection.preparedstatement ( ... );
...
pstt2.executeUpdate();
connection.commit();
}ca...
Please excuse me, today is my first day trying to setup a CI environment using TeamCity. I'm developing an ASP.NET/Sql Server app and so far so good. MSBuild is my provider.
I'd like to know what the options are when it comes to automatically making sure changes to my local database are uploaded to the test server as part of the integr...
Hi all,
I'm developing an intranet webapp in asp.net that has a requirement for storing user profile images.
@edit: The webapp should be running in two different web servers at the same time.
My question is, what would be the best approach? Saving the photo with the profile (I'm using the SqlProfileProvider) or upload it to the file ...
Hi, I have database application, I want to allow the user to restore the deleted records from the database, like in windows we have Recycle bin for files I want to do the same thing but for database records, Assume that I have a lot of related tables that have a lot of fields.
Edit:
let's say that I have the following structures:
Repo...
I am using and working on software which uses MySQL as a backend engine (it can use others such as PostgreSQL or Oracle or SQLite, but this is the main application we are using). The software was design in such way that the binary data we want to access is kept as BLOBs in individual columns (each table has one BLOB column, other columns...
Hi ,
I want a to create a new user on a db with only the select permissions (read only access)
how can i do this ?
i'm working with sql 2008
...
I'm building a freelancing site (think scriptlance) which has listings of projects both on the home page and the listings page. I thought it would be a good chance to implement OOP techniques.
I was thinking I would create a project class which among other things would have a function to echo the relevant contents for the home and list...
Hello all,
I am using c# .net.
Thanks in advance for any help.
I have searched the web, but don't think I am using the right words, as nothing being returned is really helping.
I have a 'edit' section within my web-form which allows the user to tick (using a checklist) certain information.
For example:
• Receive newsletters
• ...
I'm would like to use Scala to persist data to a relational database, so what I am looking for are examples of CRUD operations using Scala.
I would like to code on a lower level of abstraction than an ORM like Hibernate/Toplink (read:JDBC), but between us, I would like to see examples of all types.
Thanks folks.
...
Hello there
When making relations between tables (in mysql), I have encountered a naming dilemma.
For example, if I was creating a site where a project could be created by multiple users and also read by multiple users, to link a questions and user tables, I would potentially need two tables.
**project_authors**
questionId
userId
a...
I want to store data in string form to MySQL. I have created the tables in the MySQL.
I haven't worked with DATABASE ever. Can you please provide me code to store that data in the MySQL DB.
e.g. Let's say I have a string "stack_overflow" and there is a column "SiteName" in a table "SiteDetails" in the DataBase.
So how to store the string...
I have multiple databases on a single instance of SQL Server 2005. I've created a synonym on one database to access a table on another database and when writing my queries, I'd like to utilize a specific index, however, when evaluating the execution plan, it doesn't appear to use it. If I write the query to access the database explicit...
I'm currently on a non-IT project that currently has data which requires some systematic analysis (mathematical formulas). The data is currently stored in Excel but it's a pain to manually enter/massage data in Excel to do the analysis.
Would it be better to store the data in MS Access and use Excel to query Access? In other words, st...
I'm working on an application for one of our departments that contains medical data. It interfaces with a third party system that we have here.
The object itself (a claim) isn't terribly complex, but due to the nature of the data and the organization of the database, retrieving the claim data is very complex. I cannot simply join all t...
I've 3 tables.
Users (id, mail, username, etc..)
Practices (id, name)
UsersPractices (userId, practiceId)
The last one is the relational table which is n-n.
I'd like to update this one, depending on the user's will.
It means, that he could want to add, or remove some his practices.
What algorithm could i use to do this ?
Should i...
Since in log4j javadoc is
WARNING: This version of JDBCAppender is very likely to be completely replaced in the future. Moreoever, it does not log exceptions.
What should I do to log to a database?
...
What would be the best way to render list of many items (like comments that follow articles or blogs) on the web page from a database?
I've noticed in many sites 3 options:
Table
list of <ul> (ul under ul under ul...)
list of <divs> (div under under div...)
And what asp.net control should i use?
Datalist, repeater?
...
I'm building an ASP.NET MVC app and I'm using a repository to store and retrieve view objects. My question is, is it okay for the implementation of the various repositories to call each other? I.E. can the ICustomerRepository implementation call an implementation of IAddressRepository, or should it handle its own updates to the address d...
A while ago I wrote a plan management system for the council that I work for, which lets us store all the old and new plans in digital format with information associated with via a access database(I didn't know MS SQL server at the time).
Each plan has a unique plan ID which is just a auto incrementing int (primary key), a title and ...
I have an app that needs to be able use either an sqlite3 datebase or an mysql database. The customer wants to be able to choose between the two (obviously one would be local and one would be online).
My thoughts for doing this would be by creating a database interface that has all of the common methods (ExecuteReader, ExecuteScalar, et...