Creating a new database and new connection in Oracle SQL Developer

This tutorial should help you: Getting Started with Oracle SQL Developer See the prerequisites: Install Oracle SQL Developer. You already have it. Install the Oracle Database. Download available here. Unlock the HR user. Login to SQL*Plus as the SYS user and execute the following command: alter user hr identified by hr account unlock; Download and … Read more

Necessity of explicit cursor.close()

Django’s cursor class is just a wrapper around the underlying DB’s cursor, so the effect of leaving the cursor open is basically tied to the underlying DB driver. According to psycopg2’s (psycopg2 is DB driver Django uses for PostgreSQL DB’s) FAQ, their cursors are lightweight, but will cache the data being returned from queries you … Read more

SQL Express connection string: mdf file location relative to application location

Thanks everyone, I used a combination of your responses. In my app.config file my connection string is defined as follows <add name=”MyConnectionString” connectionString=”Server=.\SQLExpress;AttachDbFilename=|DataDirectory|\MyDatabase.mdf;Database=MyDatabaseForTesting;Trusted_Connection=Yes;” /> In my unit test class I set the DataDirectory property using the following [TestInitialize] public void TestInitialize() { AppDomain.CurrentDomain.SetData(“DataDirectory”, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “Databases”)); // rest of initialize implementation … }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)