create

Mysql Prepare Statement error while executing

Hi All, I am trying to create a table though prepare statement but it is giving me syntax error. well if o try to execute the same statement individually then it work fine. here's my statement - SET @Stmt1 = Concat('DROP TABLE IF EXISTS ',DB,'.`county`;\n' 'CREATE TABLE IF NOT EXISTS ',DB,'.`County` ( `CountyID` INT UNSIGNED NOT NULL...

Efficient way of creating recursive paths Python

Hi I need a simple function to create a path in Python where the parent may or may not exist. From python documentation os.makedirs will fail if one of the parents exists. I have written the below method as which works by makes as many sub directories as necessary. Does this look efficient? def create_path(path): import os.path...

MySQL error 1005 on table create -- wtf

My table definition: CREATE TABLE x ( a INT NOT NULL, FOREIGN KEY (a) REFERENCES a (id) ON UPDATE CASCADE ON DELETE CASCADE ) ENGINE = InnoDB; which produces the following error: ERROR 1005 (HY000): Can't create table './abc/x.frm' (errno: 150) What does this mean? ...

Cannot insert into table because the table already exists?

I have a user table. I want to insert data into my user table. I have a statement: SELECT columna, columnb, INTO my_table FROM my_other_table WHERE (... conditions ...) I get the following error: SQL Server Error on (myserver) Error:2714 at Line:1 Message:There is already an object named 'my_table' in the database. Yes, thanks S...

what is wrong with my create table SQL?

Hello everyone, I am using SQL Server 2008 management studio to execute the following SQL statements, and here is the related error message from SQL Server management studio. Any ideas what is wrong? SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO Create TABLE [dbo].[BatchStatus]( [BatchID] [uniqueidentifier] NOT NULL CONSTRAINT...

Delphi: TImage.Create causes Access violation

I apologize in advance for a newbie question, but why do I get "Access violation" error with the code below (on the "Create(SelectorForm);" line)? I tried using the main form as the owner, but it didn't make any difference. var SelectorForm: TSelectorForm; ArrayOfImages: Array [1..10] of TImage; implementation procedure TSelectorF...

create a javascript document Object

Is there any way to create or recreate a javascript document Object by calling a function. Something like <script type="javascript/text"> var document = createDocument("some html"); </script> I want to do this so I can solve the issue in this question client side xslt with javascript in firefox ...

Error creating MySQL table

Hi, I get an error when running the following create table: CREATE TABLE Event ( id VARCHAR(10) NOT NULL, title VARCHAR(100), start_date DATE NOT NULL, end_date DATE, description TEXT, url VARCHAR(200), website VARCHAR(200), location VARCHAR(32) NOT NULL; PRIMARY KEY (id), FOREIGN ...

Fast Algorithm to Generate 500,000 html file.

What is the fastest way (Algorithm) to generate 500,000 static html files from DB? And is it a good practice to put all this files in single folder? or create hierarchically for this files? We want to handle about 6,000,000 concurrent hit, so the static files will be a good solution for that. the source DB will be simple flat table wi...

MySQL: Creating table with FK error (errno 150)

I've tried searching on this error and nothing I've found helps me, so I apologize in advance if this is a duplicate and I'm just too dumb to find it. I've created a model with MySQL Workbench and am now attempting to install it to a mysql server. Using File > Export > Forward Engineer SQL CREATE Script... it outputs a nice big file fo...

How to create or write text file in servlet?

i have tried this code. I didn't create any file. I am doing this in netbeans where server is glassfish v2 public void create_file(String file_name) { FileWriter file_stream; BufferedWriter out_stream; try { file_stream= new FileWriter(file_name); this.out_stream = new BufferedWriter(file_stream)...

create database with specific data file location in Mysql for one database at runtime

Hi All, Can anyone give any input on how to create database in mysql where it should create its data file at runtime instead of storing it on default location specified in my.cnf. Is there any way for doing this in mysql anyone come across. Thanks in advance. ...

Problem with creating a directory in Java

Hello, I am trying to create a directory in Java. I think I have provided correctly all necessary things so that I make the directory, but it is not created. You can see from my code below and the corresponding output that every element from which I compose the path of the new directory should be correct and valid. It seems, however, th...

How to change column names from VBA

I am creating an Excel spreadsheet in Access vba code. I need to change the column names from A, B, C, etc to a meaningful name. I have looked high and low but cannot find a way. ...

CREATE TABLE reverse engineering in Oracle

In Oracle SQL Developer, there's a "SQL" tab for each table. This tab contains most of the SQL code (CREATE TABLE, CREATE TRIGGER, etc) that's needed to recreate the table. Is this information available programatically from the database system, or is this an application feature of SQL Developer? If the former, what commands/statements ...

SharePoint: How to create/delete multiple items in a transaction

Hi I am trying to delete multiple items in a sharepoint list. But the constraint is : either all the items should be deleted or not a single item should be delted.In short I am looking for trasactional behavior in SharePoint.I tried to use ProcessBatchData() function. But it seems that it doesnt fulfill my requirement. Is there any othe...

creating zip file from a folder - in c++

I want to create a program that , when executed, will compress a selected folder. Can it be done? Thanks, Oded ...

iPhone Dev - Create UIButton Manually

Hi, I'm learning how to develop on the iPhone, I bought a book called Beginning iPhone 3 development Exploring the SDK. After I bit I decided to ditch Interface Builder. I still design all my views in IB, but I write It all in code and only use the nib file to get the controls' frames. So now I need to make a UIButton, and the documenta...

jquery create css rule / class @ runtime

usually i have a css file which has the following rule: #my-window { position: fixed; z-index: 102; display:none; top:50%; left:50%; } how can i avoid creating such a static css file by adding the css-information during runtime actions to the body or what else. (only using jquery) i want to define it once but with...

How to create animated text using ExtJs

Can any one please help to how to create animated text using ExtJs ...