this query will just one row as a result
myDataContext db = new myDataContext();
var query = from u in db.users
where u.userId == myUserId
select u;
I usually get the result out from the "query" object by using "foreach"
foreach(var i in query){
username = i.username;
}
...
I'm building a student rostering application for a friend and I'm just about done except for the GUI. I'm writing it in wxpython but I'm not sure how to proceed with the input fields because it is a relational database. Is there a simple way to do this?
...
I switched my DAL from using LINQ over to Entity Framework. Because my application connects to different databases depending on the current user, I need to dynamically create the DataContext at run time and pass in the appropriate connection string. However, when I tried to programatically create an Entity Framework connection using my...
How can I predict the future size / growth of an Oracle table?
Assuming:
linear growth of the number of rows
known columns of basic datatypes (char, number, and date)
ignore the variability of varchar2
basic understanding of the space required to store them (e.g. number)
basic understanding of blocks, extents, segments, and block ov...
Does anyone have a process or approach to use for determining how to resove a many-to-many relationship in a relational database? Here is my scenario. I have a group of contacts and a group of phone numbers. Each contact can be associated with multiple phone numbers and each phone number can be associated with multiple contacts.
A si...
hello
I have a very big problem solving this issue
I have 2 tables
first table is :
which contains a modules (id and name)
second table is
which contains users ids and their preferred modules' numbers
now lets move to the problem
I want to generate a list of checkboxes
for example for the userid 1 which has the following module...
Hi,
I am working with system like CMS that need to versioning documents.
what is best practice and methodology for create database for it with any how its table?
...
Suppose I have some objects, and I want the user to be able to reorder them in any way they wish, say, by dragging them around. So I'd have
cheese
muffins
milk
and then the user drags 'milk' to the top, making the new order
milk
cheese
muffins
Is there a best practice how to store the order of these objects in a database? The nai...
I am upgrading a client's e-commerce webstore and have hit a bit of a snag.
The store is a custom-made set of PHP scripts. At each sale, the credit card is charged via the merchant account interface, and then the order is e-mailed to the client's desktop INBOX. However, as the company grows, this became unscalable, as the client spends ...
I have a C# application which works with an Oracle database and has been already shipped. Now it's time to ship out a new release. The C# object model have been revised and had an impact on the table structure.
If I ship out the new release, I need to take care of existing data. Just dropping tables and recreate these tables wouldn’t ma...
How to build a simple recommendation system? I have seen some algorithms but it is so difficult to implement I wish their is practical description to implement the most simple algorithm?
i have these three tables
Users
userid username
1 aaa
2 bbb
and
products
productid prod...
Hi,
I'm using an sql server 2005 hosted in the states. Soon we will move the db to Europe.
I'd like to update the dates in the db to take into account the timezone difference.
Is there a good way to do this?
Or is it just a case of looping through the dates and adding the timezone offset?
...
I have 2 tables:
posts
tags
Tags table is structured like this:
post_id
tag
So for every tag that's given for a post, I create a record in the tags table. If a post has 10 tags, there will be 10 records in tags table with that post_id.
I'm now trying to build a search page where users can do a search for posts where tags do not ...
What is the reason for getting an 'invalid parameter error' when calling the CreateDataSet method in a TClientDataSet component. What causes this error.
Kind Regards
Riaan de Villiers
...
Is it always good to use stored procedures , is it good for database performance and what kind of queries that you better use stored procedures?
Exact Duplicate: When should you use stored procedures?
...
I don't think I am the only person wondering about this. What do you usually practice about database behavior? Do you prefer to delete a record from the database physically? Or is it better to just flag the record with a "deleted" flag or a boolean column to denote the record is active or inactive?
...
I am currently developing a small project of mine that generates SQL calls in a dynamic way to be used by an other software. The SQL calls are not known beforehand and therefore I would like to be able to unit test the object that generates the SQL.
Do you have a clue of how would be the best approach to do this? Bear in mind that ther...
What are the datastructure used in DBMS like Oracle,MySQL & Sqlite for storing and retrieving records.
...
Is there any solution other than the ugly ADO as it is not good and badly documented?
...
Mostly we change existing database tables, stored procedures, functions or parameters in tables for software upgrades/bugfixes. And when it's time to deploy our changes to another environment like production or preproduction, some parts of our db changes are forgotten.
In our company, some developers use a database difference analysis a...