Showing posts with label allwe. Show all posts
Showing posts with label allwe. Show all posts

Monday, March 19, 2012

component taking long time to load

hello all
we have an applicaion developed in ASP with SQL server as back end.
Our Application consists of many compoents (typically treated as hyperlinks in the application). now, all the components are responding fine except one component taking long time to load. I have checked my Queries in the backend and they were fine..
what could be the problem ?
I am getting an error OLEDB DRIVER TIMEOUT EXPIRED when i click on the component link.

Plese suggest me some ways...

Thanks and Regards
SAIHave you tried increasing the timeout ? What are you clicking on - what type of application ?|||Originally posted by rnealejr
Have you tried increasing the timeout ? What are you clicking on - what type of application ?

Hello,
the Application is a ASP application, and i am clicking on one of the Hyper link out of several..
Except this link all the other links are working fine..

sai|||But what type of application/database are you trying to connect to ? Have you tried to increase the timeout ? What are the connection strings like for this application that is having a problem - is it hitting a different sql server ?

Wednesday, March 7, 2012

Complex SQL Query

Hi All
We have search page and want to query the database with search terms
entered.
The table details are like this
TapeRecords
ID (Primary Key)
ItemTitle
Location
Country
Keywords
TapeLogDetails
ID (primary key)
TapeNumber (Related to TapeRecords.ID)
Description
What I am looking for is the SQL Query to query the database for all the
records that match two search items i.e. "Burma" "Asia"
I want to search the combination of two in any of the following fields
TapeRecords.ItemTitle
TapeRecords.Location
TapeRecords.Country
TapeRecords.Keywords
TapeLogDetails.Decription
If the two keywords match AND combination of any of the above fields I want
to display the records.
For example "Burma" in decription and "Asia" in ItemTitle or "Burma" AND
"Asia" in Location
Is this possible?JP
Since you have not provided the DDL I have made some assumptions
CREATE TABLE w
(
COL1 VARCHAR(20)
)
INSERT INTO W VALUES ('URIDIMANT')
INSERT INTO W VALUES ('DIMANT')
INSERT INTO W VALUES ('URIRON')
INSERT INTO W VALUES ('RR')
CREATE TABLE w1
(
COL1 VARCHAR(20)
)
INSERT INTO W1 VALUES ('URIDIMANT')
INSERT INTO W1 VALUES ('DIMANTRON')
INSERT INTO W1 VALUES ('URI')
INSERT INTO W1 VALUES ('URIRON')
SELECT W.COL1,W1.COL1 FROM W JOIN W1
ON W.col1 LIKE '%' + W1.col1 + '%'
DROP TABLE W
DROP TABLE W1
"JP SIngh" <none@.none.com> wrote in message
news:urPcJYNIGHA.596@.TK2MSFTNGP10.phx.gbl...
> Hi All
> We have search page and want to query the database with search terms
> entered.
> The table details are like this
> TapeRecords
> ID (Primary Key)
> ItemTitle
> Location
> Country
> Keywords
>
> TapeLogDetails
> ID (primary key)
> TapeNumber (Related to TapeRecords.ID)
> Description
> What I am looking for is the SQL Query to query the database for all the
> records that match two search items i.e. "Burma" "Asia"
> I want to search the combination of two in any of the following fields
> TapeRecords.ItemTitle
> TapeRecords.Location
> TapeRecords.Country
> TapeRecords.Keywords
> TapeLogDetails.Decription
> If the two keywords match AND combination of any of the above fields I
> want to display the records.
> For example "Burma" in decription and "Asia" in ItemTitle or "Burma" AND
> "Asia" in Location
> Is this possible?
>
>
>|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. What you did post is a complete mess.
There is no magical, univeral "id', the rest of the names violate
ISO-11179 rules, are you really modeling tape records and not tapes
themselves? Why is there a detail table with a header table? etc.
Here is a guess.
CREATE TABLE Tapes
(tape_nbr INTEGER NOT NULL PRIMARY KEY,
tape_title VARCHAR(20) NOT NULL,
tape_loc VARCHAR(20) NOT NULL,
country_code CHAR(3) NOT NULL, --iso standard);
--normalize the data
CREATE TABLE TapeKeywords
(tape_nbr INTEGER NOT NULL
REFERENCES Tapes (tape_nbr)
ON UPDATE CASCADE,
ON DELETE CASCADE,
keyword VARCHAR(15) NOT NULL,
PRIMARY KEY (tape_nbr, keyword));
CREATE TABLE TapeLog
(tape_nbr INTEGER NOT NULL
REFERENCES Tapes (tape_nbr),
log_seq INTEGER NOT NULL,
PRIMARY KEY (tape_nbr, log_seq),
tape_description VARCHAR (100) NOT NULL);
Rows are not anything like records, and columns are not anything like
fields. This is foundations. This will mean that you have to clean up
your data before you can do anything. Now write two queries on Tapes
and TapeKeywords and UNION them. I would extract keywords from the
titles and use relational divisions on that single table myself.