import

Importing data into Oracle via Web Enterprise Manager with unique constraints

I am not at all familiar with Oracle so bear with me! I am using version Oracle 10G with the web front end called Enterprise Manager. I have been given some CSV files to import however when I use the Load Data from User Files option I think I can set everything up but when the job runs it complains that there are unique constraints, I ...

PostgreSQL: database restore from dump - syntax error

Hi folks, I'm trying to restore a PostgreSQL database by executing the SQL that pg_dump created, on an empty database. I'm getting this error: ERROR: syntax error at or near "\" LINE 5211: \. lines 5210 and 5211 read: COPY auth_group (id, name) FROM stdin; \. It works fine on my Linux server, where I use this command: psql -U ...

Newbie in .net: how to add a library to project

I'm new in .net and I'm interesting in following. I've downloaded a library from this. But I don't know how to import it into my project for using. How do I do that? ...

import twice when run test

i have this code in my tests.py: from models import * and in the models.py I have a signal handler and register it with post_save.connect( post_save_note, sender=Note ) and when i run test with ./manage.py test main I found the signal handler was registered twice and executed twice, and I found it's because the models was imported ...

Import process from some other file to sql database in vb.net

I have a excel file format like first some rows shows address of company,after two row shows the column names.some rows data of corresponding column contains sub columns But want format of excel like first row considered column names,after that are consider data of relevant column names. so how can i convert this, ...

How can I track python imports

I have cyclical import issues adding some new code to a very large app, and I'm trying to determine which files are the most likely causes for this. It there any way to track which files import which files? I did a bit of looking and found the python trace command, but it's just showing a bunch of activity in the main python libraries. ...

#import command line equivalent

Using Visual Studio with Microsoft's C++ compiler, we have several source files which use the Microsoft-specific '#import' directive to import a type library. For instance: #import my_type_lib.tlb I'd like to remove the #import from the source code, and replace it with a command line step to be executed via GNU Make. The necessary i...

how to reference python package when filename contains a period

I am using django and I have a file named models.admin.py and I want to do the following idea in models.py: from "models.admin" import * however, I get a syntax error for having double quotes. But if I just do from models.admin import * then I get "ImportError: No module named admin" Is there any way to import from a python file ...

How to refer to the local module in Python?

Let's say we have a module m: var = None def get_var(): return var def set_var(v): var = v This will not work as expected, because set_var() will not store v in the module-wide var. It will create a local variable var instead. So I need a way of referring the module m from within set_var(), which itself is a member of modul...

Bulk import from Informix into Oracle

Hi. We need to pull some tables from an Informix SE database, truncate tables on Oracle 10g, and then populate them with the Informix data. Does a bulk import work? Will data types clash? I'd like to use a simple Java executable that we can schedule daily. Can a Java program call the bulk import? Is there an example you can provide? T...

In Python, is the idiom "from Module import ClassName" typical?

Since I prefer small files, I typically place a single "public" class per Python module. I name the module with the same name as the class it contains. So for example, the class ToolSet would be defined in ToolSet.py. Within a package, if another module needs to instanciate an object of class ToolSet, I use: from ToolSet import ToolSet...

How can I import an Excel spreadsheet on a 64 bit OS using ASP.NET?

I wrote an ASP.NET page that imported data from an Excel spreadsheet without any problems. Then I moved it to the server and found out that it didn't work on a 64 bit OS. After some Googling I found that MS does not have nor will it ever have a Jet DB driver for 64 bit OS. Does anyone have any suggestions for a way to easily import da...

Importing into the SPS-Birthday field in Sharepoint from Custom Field in Active Directory, why does it always store a null value?

For reference this is the User Profile Properties section of Sharepoint where you can start an import. Ours is configured to interface with Active Directory. We have mapped the SPS-Birthday field to a custom field in Active Directory since Active Directory doesn't natively store birthdays. Everytime we try to import a birthday from ...

how to make import conditionally in Python?

I want to do something like this in C: #ifdef SOMETHING do_this(); #endif But in Python this doesn't jive: if something: import module What am I doing wrong? Is this possible in the first place? ...

How can I prevent a Python module from importing itself?

For instance, I want to make a sql alchemy plugin for another project. And I want to name that module sqlalchemy.py. The problem with this is that it prevents me from importing sqlalchemy: #sqlalchemy.py import sqlalchemy This will make the module import itself. I've tried this, but it doesn't seem to work: import sys #Remove the ...

Pyjamas import statements

I'm starting to use Pyjamas and I'm running into some annoyances. I have to import a lot of stuff to make a script work well. For example, to make a button I need to first from pyjamas.ui.Button import Button and then I can use Button. Note that import pyjamas.ui.Button and then using Button.Button doesn't work (results in error...

IronPython disable Import after use

Is there any way to disable the use of import once I've finished using it? I'm using IronPython as a scripting engine and I don't want users to be able to import anything. This could be done in LuaInterface by the use of setfenv: luanet.load_assembly("System.Windows.Forms") luanet.load_assembly("System.Drawing") Form=luanet.import_type...

Suppress deprecated import warning in Java

In Java, if you import a deprecated class: import SomeDeprecatedClass; You get this warning: The type SomeDeprecatedClass is deprecated Is there a way to suppress this warning? ...

Importing old data with Rails and Paperclip

I'm using paperclip for attachments in my application. I'm writing an import script for a bunch of old data, but I don't know how to create paperclip objects from files on disk. My first guess is to create mock CGI multipart objects, but that seems like a bit of a crude solution, and my initial attempt failed, I think because I didn't ge...

Where is the python imp module's source code? Or the common location of the file.

I'm using Python 2.6 on Ubuntu. ...