create

Create table from existing DataTable/Dataset data with ADO.net ?

I need to create two tables. The first one I can get via database with a command. No sweat. The second one is built from the first one with nested SELECT statements, JOINs, and operators like SUM, AVG etc. So it needs more functionality than filtering and sorting. It is done in C# with .NET 2.0, so no advanced features available. Ess...

MySQL error 150, cannot create table.

I'm having trouble creating a table and I don't understand what's wrong. phpMyAdmin sets the error indicator next to the PRIMARY KEY declaration... I don't get why this is wrong... This table is a child table, which has a one-to-many identifying relationship with another table. CREATE TABLE IF NOT EXISTS `ruilen`.`Voorwerpen` ( `voorwe...

Separating Create Table statements

I am using Informix DB and I need to take a backup of create table queries of each table present in the DB.I don't need to clone the database because my need is only the create scripts.I am using WinSql to access the DB.Any help would suffice.TIA ...

Are Custom Filters in NUnit Possible?

Is it possible to define a custom filter so that NUnit will only run specific tests? I have many of my Nunit tests marked with a custom attribute "BugId". Is it possible to write a filter so that I can pass in a number and only run the tests with that attribute and number? If so show mockup or real code. ...

Mysql create table query problems?

I want to create a table, which name something like : name_thisyear_thisweekofyear, e.g -> name_2009_40 I tried this query: CREATE TABLE IF NOT EXISTS name_YEAR(NOW())_WEEKOFYEAR(NOW())(id int NOT NULL AUTO_INCREMENT PRIMARY KEY, phone_no int, created datetime, deleted datetime) It doesnt work. Please help Error Message: #1064 - Y...

create dialog without id in jquery

Hi All, I have a query regarding jquery that i want to create a dialog open and then fill some values in it. As i have tried to create a dialog using jquery it uses old values because that div already exists on that page. So i want to create an object of the dialog using jquery and then fill fields in it. I am using jsmarty and jquery t...

Creating A New SaveFileDialog

After a lot of thought and consideration, and Google-ing, I'm hell-bent on creating my own SaveFileDialog. But I do not know where to start and since I haven't seen anything around the web, I would like to know if anybody has done this before, and what I should look into, or how I might go about doing this? Any help would be greatly app...

create new class attributes from optional info without specifiying the names

I have a class like so: class Item attr_accessor :item_id, :name, :address, :description, :facilities, :ratings, :directions, :geo, :images, :video, :availability def self.create options={} item = Item.new item.item_id = options[:item_id] item.name = options[:name] item.description = options[:desc] item.ratings ...

seam @create doesn't finish before other methods called on component

Ok I'm having a problem with SEAM (2.1.1.GA) that doesn't make any sense to me. I have a component which is session scoped and annotated with @AutoCreate. The component has a creation method annotated with @Create. The problem is that BEFORE THE CREATE METHOD COMPLETES seam is calling another method on the same component instance. Bec...

Creating folders using DirectoryEntry

I am writing an ASP.NET (C#) application to create users for my domain. It also has to create folders and shares on a separate file server. I have so far been able to accomplish my task using System.IO.Directory.CreateDirectory to create the folders, a ("WinNT://fileserver/lanmanserver") DirectoryEntry to create the shares. Unfortu...

Creating a reference in Java

I want to use a reference as a shorthand to an array element, where the array consists of elements of a basic type (integers). How can I explicitly create a reference in Java? Is it possible? /* ... */ //neighbors = new int[][] //I'm using neighbor, below, to refer to an element in neighbors so that the code //is easier to read. I want ...

Creating files on AppEngine

I'm trying to store some data in a binary file: import os, pickle o = some_object() file = open('test', 'wb') #this causes the error pickle.dump(o, file) file.close() I get this error: IOError: invalid mode: wb It doesn't work (neither on test server or GAE itself), apparantly because it does't have the write permission. How can I ...

duplicacy problems while creating a sudoku puzzle

I am trying to create my own normal 9x9 sudoku puzzle. I divided the problem into two parts - creating a fully filled sudoku, and removing unnecessary numbers from the grid Right now, I am stuck with the first part. This is the algorithm I use in brief: a) first of all I choose a number (say 1), generate a random cell position,...

How can I create a new user for a sharepoint site

I am trying to create users that I can add to groups on my site, but I just can't figure out how to create a new user, all I can find is how to add an already existing user. Please help me. ...

CREATE DATABASE using file in default path

I want to create an SQL script that creates a database. Right now, I have this: CREATE DATABASE [Documents] ON PRIMARY ( NAME = N'Documents', FILENAME = N'Documents.mdf') LOG ON ( NAME = N'Documents_log', FILENAME = N'Documents_log.ldf') COLLATE SQL_Latin1_General_CP1_CI_AS However, this generates the following error: Msg 5105,...

Create a SQL Server database on a remote machine mdf file path issue

I'm trying to create a MS Sql Server database on a database instance running on a remote machine. When I'm doing so I need to be able to specify the path to the database (.mdf) file. If I try to create a database in a folder which doesn't exist, SQL Server will just fail (wouldn't it be nice if it created the folder structure automatic...

Create Select clause within Stored Procedure?

I have two tables coming which has data from two different systems. I need to reconcile the data in these two tables The column mapping needs to be made configurable. E.g.: Table A Table B Col1A, Col2A Col1B, Col2B MappingTable Col...

Assemblies mysteriously loaded into new AppDomains

I'm testing some code that does work whenever assemblies are loaded into an appdomain. For unit testing (in VS2k8's built-in test host) I spin up a new, uniquely-named appdomain prior to each test with the idea that it should be "clean": [TestInitialize()] public void CalledBeforeEachTestMethod() { AppDomainSetup appSetup = new A...

How to create an empty file at the command line?

How to create an empty file at the DOS/Windows command-line? I tried: copy nul > file.txt but it always displays that a file was copied. Is there any other method in the standard cmd? It should be a method that does not require the touch command from Cygwin or any other nonstandard commands. The command needs to run from a script s...

update each row in a procedure

I have the following data in a table TABLE1 DOCUMENT ------ FIELD1 12345 23456 34567 45678 98765 i have the following data in a view VIEW1 DOCUMENT ---- BUS 12345 ------------ 5 23456 ------------ 6 34567 ------------ 8 45678 ------------ 12 98765 ------------ 14 What i would like to do is update each row if (table1.document = v...