have table COLLECTIONS and table CLOTHES.As an example, when showing the items on Listview, collection HAWAII would be written on the top, and its texts and images on the itemTemplate.Then, collection WINTER and its texts and images on the itemTemplate.And so on.P.S: I“m connecting the Listview visually thru SQLDataSource, not programatically.How can i do it ? On the layout template using a JOIN on the SQL Statement ?
I am having trouble deleting three table rows using SQL. The middle table is a junctional table allowing a one to many relationship between table 1 and table 3.
Table 1 Order_Id int Primkey FK1 Name Varchar Date Datetime
Table 2 Order_Id int PrmKey FK1 Item_Id int PrimKey FK2
Table 3 Item_Id int PrimKey FK2 Description Varchar Price money
Acually, I want to delete all rows associated with any particular order.
IDE: MS Visual Studio 2008 / SQL Server 2005 Express / SQL Server Management Studio Express 2005 Skills: BeginnerI was trying to delete a table from my database ASPNETDB.MDF ,that DB was previously used for User login information i made it by using asp.net built in login support by opening ASP.NET configuration ,but now i want to built my own simple login control...so i want to remove all the tables made by ASP.NET configuration.I got this error when deleting one of the table"Could not drop object 'dbo.aspnet_Applications' because it is referenced by a FORIEGN KEY constraint"
I want to delete the items in db using linq to sql below is my code
[Code]....
here i am very much confused about this var delt= from x what is x here? and dc2.emps.deleteonsubmit (here what is emps?)i am getting errors like emp id doesnt exist in the current context.
What I don't quite get is why the total database size is 642.56 MB when the size of the individual tables is so much smaller. We pay for the total amount, in chunks of 500 MB. I was trying to see which tables where causing the DB to be so big, but to me, it looks like it is not the size of the tables but something else.
What should I look at to figure out why we are taking up so much space? Am I not understanding how this works?
I want to know that how many tables we can have in database and what is the maximum no. of columns.I also want to know the maximum size for each datatype.
I need to join some tables to get the matching records. I often have to ask around to see how certain tables could be joined. Is there any way to query the information schema or some thing else to see what columns/values match in certain tables in order to figure out how tables should be joined.
I'm creating entity on a project to use them as data on my website. I got my base simple entity Users and my DataContext. The thing is i would like the database to create the table as i create Entities.
I mean, actually my database doesn't have a Users table and do not generate it as i build and launch the project. I used to be a Java dev and in Java the table can be created with JPA so i guess Microsoft made it possible with ASP.net but how to do? I've looked on the web but didn't find it.
Apologies if this is in the incorrect forum.. just a question about how to best structure some tables for a particular presentation of data. In the following table (2nd column) you'll see that each motorcycle product applies to a range of years. What is the best way to store this range of years in a relational db? At the moment I have a datefrom and a dateto field for the two ranges, but that may complicate things when I want to filter the table by a particular year. E.G. datefrom is 2006 & dateto is 2010 and I would like to filter by products for a 2008 model.
I have a problem where I would like to get a comma-separated list of items from a couple of tables as part of a set of results. All the searching I've done so far has produced results for dealing with one or two tables. I have four, and can't get my head around how to adapt the sql to deal with it.
Where Certificates is a comma separated list of Description + " " + FullLocation records. (What I'll actually do is add http:// and other html codes to make FullLocation a hyperlink, but I can do that.)
Table_Certificates ON Table_CastCertificates.CertificateID = Table_Certificates.CertificateID INNER JOIN
Table_CertificateFiles ON Table_CastCertificates.FileID = Table_CertificateFiles.FileID
WHERE (CastingID = 45)
SELECT output = @str
This actually gives all records in the for the specific casting, but I keep getting an error at the "=" in @str = COALESCE when I try joining it to another query to get each casting.
I don't know if I'm posting this in the right place - I have a feeling it can't be too difficult but I can't seem to figure it out. I've come across this problem many times and I've never solved it. I would imagine the scenario is commonplace - I have a table of Products with a PK of ProductID, and a table of related images with a FK of ProductID. Each product can have many images, but for my initial display I want to display one product record with one image record. I have a Sequence field in the Images table and I could pick the lowest one. Right and left Joins return too many records - if I have three images for Product 1 then Product 1 is listed three times.
I've gotten around this before using a flag in the Products table, or listing an image in both tables but I'm sure there must be a SQL statement that can get the information that I need.
I have a details view form inserting data into one table successfully with no problems and picking up the ID parameter from a session.
What i would like to do is one insert SOME of the fields NOT ALL get inserted into another table.
Table 1 = course
table 2 = matrixoneantwo
I tried creating a datasource which inserted data into Matrixoneanttwo and called it from the detailsview_inserting event (sqldatasource.insert() but then i realised that this data source is seperate to my current one and therefore cannot use its parameters.