insert

Oracle database table insertion

I have two tables: create table Number( num number(5)); create table Entry(id number(3), name varchar(50)); How can I increment the num field of Number table in Oracle whenever I insert something in the Entry table? ...

Getting a UserId into a SQLDataSource

I am still new to asp.net and I'm having a problem that I just can't figure out. I'm using vb and the .net membership api. My question is, how do I get the current user's userid into a DetailsView INSERT? <InsertParameters> <asp:Parameter Name="UserID"/> </InsertParameters> ...

Insert Group By count results into a table

How do you insert a group by count result into a table? I'm trying to insert a list of names with counts for each. Thanks!! ...

Inserting a node into a linked list c

Okay This is the code for insering a node into a linked list. vec_store holds seq and size. Variable seq holds the vectors and a pointer. and vec_mag takes magnitude of vectors. For some reason, the (vec_mag(v)<=vec_mag(temp2->next->data)) doesn't work which is the last condition. Any1 can solve the problem? By the way this is C code...

oracle commit kills

hi I got an oracle db 10g, here a table as an example create table Dienstplan ( Montag Number(2), Dienstag Number(2), Mittwoch Number (2), Donnerstag Number (2), Freitag Number (2), Samstag Number (2), Sonntag Number (2), gueltigAb DATE default SYSDATE NOT NULL, PersonalNr Number(10) references Mitarbeiter(PersonalNr) INITIALLY DEFERRE...

QSqlTableModel.insertRecord() is very slow

Hello, I am using PyQt to insert records into a MySQL database. the code basically looks like self.table = QSqlTableModel() self.table.setTable('mytable') while True: rec = self.table.record() values = getValueDictionary() for k,v in values.items(): rec.setValue(k,QVariant(v)) self.table.insertRecord(-1,rec) The table curr...

Adding new rows to uitableviewcell

In my application,i will be displaying only one row on the uitableview initially. I want to increase the rows as user loads the previous row with data(an uiimage, here). Asof now i'm returing value 1, in numberOfRowsInSection: method, sincei don't know how to implement it in the required way. Pls help.. My cellForRowAtIndexPath method is...

NHibernate: receiving index out of range while calling flush for insert operation

I've spent the better part of my day trying to solve this message while using NHibernate: "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" My update and delete work just fine but the call to flush after a call to save() does not work. I don't think it will be useful to post a...

jQuery: Insert text to textarea

How can i utilize jQuery to insert text at the cursor into a textarea. ...

What is the fastest way to insert a large amount of records into a SQL Server DB?

I need to insert millions of records being read from disk into SQL server. I am parsing these from a file on one machine, in what is a single-threaded process. Ideally I would want it to perform well if the SQL server is local or remote. It has to be done programatically in C#. ...

SQLite Out of Memory when preparing insert statement

I have a problem with my app it opens this database and selects rows from it ok, Then when I want to add new rows using the following code and I always get the following problem at the execution of the prepare_V2. *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error while creating add statem...

insert into sql query in wpf

Hello everyone i am new in wpf. so i have got problems with it. if you help me, i will be so pleased. thanks everyone in advance. My problem is, can not insert into name inside database in wpf. how can i fix it? my codes as follows; private void button1_Click(object sender, RoutedEventArgs e) { try { string SqlStr...

Query regarding SQL Insert in SQL Server?

I am using SQL Server 2008 and developing a project which is in maintenance phase. I want to insert record in a table whose primary key is an Integer but not an identity. e.g. table name is tblFiles and fields are ID, FileName, FileContent. Actually that table is in use so I don’t want to make any schema change in it. And I want the ...

Android:Is there a better way to insert and/or update a database entry?

I have a database containing a userId and a note. The user doesn't know if there already is a note in the DB so they write one and click the 'Submit' button. I want to insert this note if there is no note for the userId or update that userId's already existing note: notesDb.open(); boolean updateResult = notesDb.upda...

Why does insert from php to mysql mis-handle question marks sometimes, but from command line never?

I have a simple table: describe chat_public_messageboard ; +--------------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+---------------+------+-----+---------+----------------+ | message_id | int(100) | NO | PRI...

Batch Insert or one by one

I am building a system, where the data will be added by user every 30 secs or so. In this case, should I go for a batch insert(insert after every 2 mins) or do I insert every time the user enters the data. The system is to be built on c# 3.5 and Sql server. ...

Create table and fill with test data provided as text

What is your way of creating and populating test tables in MySQL when looking into SO questions where tables (but not CREATEs) and test data (but not INSERTs) are provided? And what client do you use? EDIT: Here's a simply example of what I mean on SO. ...

Passing values to database from C# application form

A trying to insert a couple of values received from textboxes into a table in access database. I have perfectly written my statement without passing value for the primary key in the table since its datatype is set to auto number. Upon running the program. i click the button that runs the insert statement and i recieve the following err...

How to append distinct records from one table to another

How do I append only distinct records from a master table to another table, when the master may have duplicates. Example - I only want the distinct records in the smaller table but I need to insert/append records to what I already have in the smaller table. ...

PHP-ILooping an arrays values through a larger array

I want to know if it is possible to take an array and insert the array's values into a bigger array, multiple times, so that the values of the smaller array fill up the bigger array. Say array1 has values ([0 => 'a'],[1 => 'b'],[2 => 'c']), and array2 can hold 8 values. So, how would I take the values of array1 and insert them into arr...