Archive for the ‘MSSQL’ Category

Installing Django from SVN and setting up django-registration (on Ubuntu)

March 14th, 2008 No comments

Go to the shell and navigate to a directory that you want to leave the Django codebase. then enter the following code to check out the current codebase from Django:
svn co django-trunk

Next you will need to make a symbolic link to the Django codebase:

sudo ln -s `pwd`/django-trunk/django/ /usr/lib/python2.5/site-packages/django

Link to django-admin, which is used to create Django projects:

sudo ln -s `pwd`/django-trunk/django/bin/ /usr/local/bin

Make sure not to use regular apostrophes around pwd or else you could run into an error with your libraries.  I was getting this error (since the mapping was going to the wrong place)
Traceback (most recent call last):

File "", line 2, in <module>
from import execute_manager
ImportError: No module named

Django registration

svn checkout registration/
sudo ln -s `pwd`/registration /usr/lib/python2.5/site-packages/registration

Categories: Django, Linux, MSSQL, Ubuntu Tags:

Insert Java Date type into MSSQL’s datetime

May 17th, 2007 No comments

Seems a little ugly for what it does, but hey it’s OO-fantastic.

Statement stmt = null;
Connection con = null;

con = DriverManager.getConnection(connectionURL);

java.text.DateFormat df = new java.text.SimpleDateFormat(“MM/dd/yyyy”);
String startDate = df.format(date_var);
stmt.executeUpdate(“INSERT INTO XX (day_entry) VALUES (‘” + startDate + “‘);”);
catch(Exception e)

Categories: Java, MSSQL Tags:

Setting up MSSQL in Eclipse

May 16th, 2007 No comments

Download MSSQL Driver:
Note: If you are running MSSQL 2000 the MSSQL 2005 driver will work for you too.

Add driver to eclipse project:
1. Right-click on the project then go to properties
2. ‘Java Build Path’
3. ‘Libraries’ tab
4. ‘Add External JAR’.

SQL Explorer in Eclipse:
Setup instructions

Categories: Eclipse, Java, MSSQL Tags: