I am trying to avoid that: the idea is to have one general method that will take any of nine queries to generate different files than to have nine specialist methods that each take only a single query.
Somewhere you are defining the column names (you want it done on the entry query definition) either in 1 or 9 query constructors, I am suggesting moving the naming to post query execution, sticking that code into 1 method is trivial. Still it is a kludge b/c the aliasing should work
Never underestimate the power of human stupidity
Like I said, the aliasing is working, but it takes a very long time for the query to return. In one test case, a query with aliased columns took almost 6 minutes to return; the identical query with unaliased columns took less than a second. This kind of time difference is pretty consistent, regardless of how many columns are requested, and scales closely to the number of rows returned (the more rows, the longer the aliased query takes.)
I traced the problem to a piece of code that uses SqlDataAdapter.Fill to populate a DataSet, then took to the Internet.
It turns out that there is some optimization that SQL does with queries, where it tries to import indexes from underlying tables. This works fine as long as the columns in the view match up with the columns from the tables. When you alias the query's columns, however, things can degenerate into a quagmire of competing indexes; the delay is caused by SQL trying to wait out a resolution. You can get rid of the delay by instructing SQL to abandon arithmetic operations that result in an overflow or underflow. Huh?
The solution was to prefix the query with SET ARITHABORT ON; which tells SQL to just fly over the swamp rather than try to navigate through it. After the query, tack on ; SET ARITHABORT OFF; to reset the server variable, mainly because there is probably a reason why it set to OFF in the first place.
Please can you tell me what is the best tool for creating a database from scratch?
If that wasn't the answer you thought you were looking for then you need to understand that you don't choose a database based on tool but rather on the functionality of the database vendor. AFTER you have chosen a database then you look for applications that allow you to manage the database application.
It's all about learning not working! so I want to know the tool which can help me to insert data and retrieve it and more.
is SQL server the tool that can help me? or ADO.NET?? and what is the difference between them??
Just Like Mark wrote, I start with the whiteboard.
When that gets to small I make the model in Oracle SQL Developer Data Modeler [^], which supports Oracle, SQL Server and DB2 out of the box, and you can make your own design rules as well.
And as an extra plus, it supports source control via Subversion.
"The ones who care enough to do it right care too much to compromise."
If its running for 3 days, then for the first day it executes perfectly.
For the second day and remaining all days it gives following error.
Strange. Based on what you share, sounds like some logical error where you are considering the DayNo. Are you? Somehow, somewhere the current day is getting into picture while running the procedure and the error. Did you DEBUG and see? Check if so.
A primary key (often) consists out of multiple columns. I'd suggest putting the primary key on BOTH, and to add an autoincrement-field and make that unique. Use the autoincrement-column to make relations to other tables.
Why would you not use WharehouseID-ProductID in a concatenated field as a primary key.
That's a possibility; then again, it introduces a concatenation-action, and we'd be storing redundant information. It'd also affect performance; having a large varchar-based key (as two bigints as Id's or Guids would be concatenated to a varchar) would be not-nice for your indexes.
Or, in the words of my teacher; it would no longer be an atomic value.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
Friends i am going to develop a website which is like you tube.so i want to play an add first then i want to play the video on clicking the video file.so help me in writing the code. i wish to use two databases one for adds and other for videos.so please help me writing code
Please do not post questions asking people to write your code for you. Members of this site come here to help people who make an effort to learn and do their own work. If you do not know how to begin to create your project then find some online study guides, or buy some books.
Last Visit: 22-Aug-19 3:18 Last Update: 22-Aug-19 3:18