records

How can I copy a SQL record which has related records in other tables to the same database?

Hi. I created a function in C# which allows me to copy a record and its related children to a new record and new related children in the same database. (This is for an application that allows the use of previous work as a template for new work.) Anyway, it works great... Here's a description of how it accomplishes the copy: It popul...

Updating several records at once using Django

I want to create a list of records with checkboxes on the left side....kinda like the inbox in Gmail. Then if a user selects some or all of these checkboxes, then the selected record(s) can be updated (only one field will be updated BTW), possibly by clicking a button. I'm stuck on how to do this though....ideas? Display Code {% fo...

Rtti for Variant Records

I try to write a kind of object/record serializer with Delphi 2010 and wonder if there is a way to detect, if a record is a variant record. E.g. the TRect record as defined in Types.pas: TRect = record case Integer of 0: (Left, Top, Right, Bottom: Longint); 1: (TopLeft, BottomRight: TPoint); end; As my serializer should work recu...

Insert Records in Radgrid using user control.

How can I insert in Radgrid using user control when I clock on the Add New Record. ...

Display only specific rows on a Dynamic Data Web Site

Hi. I am creating a Dynamic Data Website. For a particular table, I would like to display only specific rows to the user. Meaning I want to filter the rows displayed to the user. Is there a way to change the query that the framework uses to fetch data from the database? ...

iphone coredata removing records between two entities connected by relation ship

I'm implementing core data in my iphone app. It has two entities. Entity1: LatestData Entity2: LatestDetailedData LatestData has URL, publishedDate, heading LatestDetailedData has URL, NewsDescription, PublishedDate, Author Both entities have same URL for a record. Both the entities are connected with inverse relation ship. And the rel...

Faster way to know the total number of rows in MySQL database?

If I need to know the total number of rows in a table of database I do something like this: $query = "SELECT * FROM tablename WHERE link='1';"; $result = mysql_query($query); $count = mysql_num_rows($result); Updated: I made a mistake, above is my actual way. I apologize to all So you see the total number of data is recovered scannin...

Create Duplicate Records on SELECT for Calendar Date Range

Hey all, I've built a pretty shnazzy calendar system but there is one tweak that I need to make so that I'm completely happy with it. My calendar has three tables: calevents - The calendared event. caldates - The occurrences and date-range of each occurrence for each event. calcats - The categories that can be applied to an event. ...

vb.net sqlite how to loop through selected records and pass each record as a parameter to another function

Hi, I have a sqlite table with following fields: Langauge level hours German 2 50 French 3 40 English 1 60 German 1 10 English 2 50 English 3 60 German 1 20 French 2 40 I want to loop through the records based ...

Oracle multiset, collection and records

Can anybody Explain me why records are required. Can't we perform the same operation in pl/sql using loop and all. Also when multiset, records query can be used i.e. in which type of situation and which one will be the preference. ...

Is it possible to restore deleted records from MDB?

I've deleted some records from an Access MDB file, is it possible in any way to retrieve the deleted records? It's very important, the only way I've found is with AccessFix which is too expensive. ...

How can you check for foreign key references for a list of records before attempting to delete any of these records in MySQL?

Is there a way, when you have a list of records, to check if each of these records have foreign key references before you attempt to delete any of these records? As an example, if I have a list of borrowers and a list of books, you should not be able to delete a borrower from the system if he still has books on loan. (My actual system i...

'unknown error' in SQLite on the iPhone when selecting total number of records

Trying to return whether a record exists in SQLite on the iPhone except I keep getting an 'unknown error'. selectStmt is static sqlite3_stmt *selectStmt = nil; used here if(selectStmt) sqlite3_finalize(selectStmt); which only gets executed if the application terminates. This functionality works fine with delete statements and insert sta...

iPhone Core Data updating records

I'm trying to find a solution to what I think has to be a simple problem. I'm using coredata to maintain a list of bookmarks in my app. there are only three fields being stored, bid, order and title. in some cases I want to update an existing record. currently I'm using a predicate to search for a particular bid. the problem I'm h...

How to extract a distinct list of records from SQL or Excel

Hi, I have an excel spreadsheet with 15 columns, one of which is EmailAddress and then 100,000+ records.. In my data i know that there are many duplicate email addresses. Can someone tell me how can i extract a distinct list where each record is represented only once by emailaddress? Alternately, if i import the data into SQL, how ca...

Sort DB records with JdbcTemplate

Hello. How to Sort DB records in DB table with JdbcTemplate? What is the best solution, should execute method be used? ...

delete oldest records from database

I have a database with 1000 records. I am trying to create a sql statement so if the number of records will grow, then the oldest records to be deleted. I am using sqlite, but I assume the usual sql syntax will fit here. Thanks ...

Commit certain number of records to DB with java

I have table in DB,e.g. TableOne. By some rules i should commit N records from this table to other tables. Is it possible to do with jdbc or ResultSet or CachedRowSet? Preliminary flow, as i see: 1. loop through ResultSet of TableOne 2. increment counter if certain condition is met 3. if condition is not met, it's time to commit to othe...

Erlang: Removing Fields in Records

Say you have an Erlang record of the following kind for songs: rd(song, {artist, title, album}). Song = #song{artist = <<"oasis">>, title = <<"wonderwall">>, album = <<"morning glory">>}. But you want to reformat the song records to include only the artist and title. How would you go about removing a field in Erlang records (in this ...

php do something for every record in the database

Hey everyone I have two tables in the database(videos and viewData) . Im trying to build a script that runs for each record in the "videos" table and does something using the "videoID" field for that specific entry in the "videos" table. The does something part would be dumping some data into the viewData table. Would I need to store ...