insert

Issue with LINQ to SQL insert . . .

i was looking at an example of how to do an insert in Linq to SQL and here it was it said: NorthwindDataContext context = new NorthwindDataContext(); context.Products.Add(new Product(..)); context.SubmitChanges(); but when i look at the below, (in my case the Table is UserInfo), the Table doesn't have an "Add" method: public System.D...

Inserting Colons into a list of Mac Addresses

I have over 500 MAC addresses and I'm trying to find a simple way to insert colons between every 2 characters. ...

Sharepoint: automatically create subfolders

Hello, I have a question. I hope someone can help me out on this one. I'm setting up a sharepoint-site for a client of ours. There's a document library ("Customers"), in which every Customer has one folder (=customername) with 4 sub-folders. The subfolders are always the same ("Technical Information", "Documents", "Security information...

SQLite: Copy all values from a previous row with one substitution.

Hi y'all, Using SQLite I need to copy nearly all of an existing row from a table, make a change to a single column, and insert the new row into the table. Something roughly like INSERT INTO $tablename (c1, c2, ... , cn) SELECT (c1, c2, ... , cn) FROM $tablenam I tried substituting a some value ci into the the list of SELECT colu...

If I have a table with only an auto-increment column, how do I insert into it?

A colleague asked me, if you have a table in SQL Server with only an auto-increment column, how do you insert a new row into that table? INSERT INTO MyTable() VALUES() ...doesn't work. As for why... I'm not really sure. But I found the question kind of compelling. ...

Informix 7.3 isql insert statement - text/blob/clob field insert error

Is a way around this?? I am trying to insert some data into a table whose structure is: Column name Type Nulls crs_no char(12) no cat char(4) no pr_cat char(1) ...

InsertAllOnSubmit only inserts first data record

I noticed a strange behaviour in my Import Service today when I tried to import multiple data records. When I do it like this, all data records are imported and the auto-incremented value is correct (see screenshot): public void Create(List<Property> properties) { foreach (Property prop in properties) { dbc.Property.InsertOnSu...

MySQL: Why is it ignoring the text in the form field?

I am trying to teach myself MySQL/PHP from the very beginning. The following code was lifted from various tutorial sites. I'm using phpMyAdmin provided by my webhost. I made a table with an auto-incrementing field called "ID" and another field called "first" (varchar, limit 30, not null). Then I made a simple form with one text field na...

MySQL "inserts" speed difference between production and local environment is too big!

Hi, I have installed MySQL 5.1x instance on a Linux machine (768MB RAM). I restored a backup of about 1000 rows and through my .NET application (deployed on a different Windows webserver) I performed certain read operations, which, when considering that the table had no indexes, were fast. I then cleared the server from these rows and ...

Insert into a temp table from a stored procedure on Sql Server 2000

I'm trying to accomplish what is described here: http://sqldev.wordpress.com/2008/05/06/insert-into-temporary-table-from-stored-procedure/ The article says (with support via comments) that this works on SQL sever 2000 but may not be as easy. This was a little tricky pre 2008 – as it turns out in SQL Server 2008 this can be do...

Insertion in Mysql

Hi friends let me know the way to the issue as follows....... i am trying to insert one table into another table as its column value.... let us say table1 contains 2 columns and table2 contains 3 columns now i need to insert the table1 into the table2 as a value of 3 column,so that in that column table1 should be present.This is perticul...

Insert Into SQL Statement

I'm fairly new to SQL, & I need help with an Insert statement. I have two tables -- Current & Old. The Current table has columns that are new & therefore isn't in Old. One of my users deleted a record from Current, & I'd like to add the record to Current from Old. I tried a simple Insert statement that "pulls" the data from Old into Cu...

How to insert multiple rows for n valueitems

Hello everyone We have a table that is used for assessment-values in our tool where each value has its valueid. Dont ask me who came up with this so called design, but now I need to add multiple valueids to the end for each assessment. So, it looks like this: AssessmentId 1, ValueId 1, Value AssessmentId 1, ValueId 2, Value Assessment...

Filemaker Pro 10: How to get the unique ID of last insert on mySQL tables (ODBC)

I have a filemaker script that inserts a new entry on several imported mySQL tables. I need to get the unique id of these entries as they are created (before or after, either way) so I can refer to them later in the script. This is easy to do in SQL with LAST_INSERT_ID(), but I can't seem to find how in filemaker. What I have tried that...

SQL: Using an INSERT within a SELECT statement

I have a SQL SELECT statement that will create its results in XML Format. I would like to INSERT into another table (Log via insert) every time a row is selected from the original SELECT Statement. Is there anyway to include an INSERT Statement inside of a SELECT Statement? SELECT cs_ads_StoreLocations.LocationGUID, *Bunch of S...

Dynamic SQL to load images from a directory

Hi, New to this and very stuck! I am trying to load images into a database from a directory using the following code. When I execute the SP I get the following form the print statements I have included; USE [store] GO DROP PROCEDURE [dbo].[insert2img] /****** Object: StoredProcedure [dbo].[insert2img] Script Date: 07/08/2009 15:3...

I know PHP's read, write, and append... but can you insert? or remove last line?

I am trying to create an XML file, but the XML file needs to be wrapped in nodes... hence, not easy to use append. Any help with this would be great!! My XML consists of 2 different node types: <entry id="1_0"> <title>This is the title</title> <description>This is the description...</description> <subName>Publishers Name<...

Weird UITableView behavior after scrolling and inserting new row

This is really driving me crazy. I have a table view that displays a sorted list of customers. Users can add a new customer, thus I have to add a new row to the table view (by updating the data model and calling insertRowsAtIndexPaths:withRowAnimation:). However, since the table view is sorted, this insert can occur off-screen, which is...

how to insert contents of a file into a blob column in a table using sqlite3

Hi everyone i need to insert the contents of a file into a blob column in sqlite3 but the thing is that i just wanna know whether it is possible by command line statement regards shroff ...

nhibernate save() generated isnert statement but no actual record was inserted into db

I have the following code. In SQL Server profiler I can see the isnert statement being generated however no actual record has been inserted. I just can't figure out why this is happening! private ISessionFactory _sessionFactory; private Configuration _configuration; _configuration = new Configuration(); _configuration.Configure(); _con...