|
One thing I would ask is there a difference in size between the 2 tables?
As the tolist forces the query to be executed against the database.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I have make this test :
First query to a small table - long delay
Second query to a bigger table - very fast
Third query to the first small table - very fast
|
|
|
|
|
if you are able show the code that you are using
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I'm using Entity , and the code is :
Dim context as new MyEntities
Query=(From t in context.DB1 select t).Tolist
Query2=(From t in context.DB2 select t).tolist
|
|
|
|
|
dilkonika wrote: What can I do Write a console app, and select where 1=1 from your database. Put that console-app in the startup-folder.
It may have multiple reasons; a database-server that isn't active yet, a database that's not yet loaded, the cache being empty, the enumerator waiting until it's enumerated..
I assume you're timing the query from a profiler?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Sorry !
But Select from which table , because I get error with just "Select where 1=1"
|
|
|
|
|
Uhhhh... you don't know much of anything about SQL servers, do you?
I suggest you learn before trying to write an application that uses one.
To answer answer your question, ANY TABLE IN YOUR DATABASE! Use you brain man!
|
|
|
|
|
I never used any command like that. ( Why do I need to select from any table ???!!!! )
for the things that I need on my application I have writed all the sql commands.
For this thing that I doesn't know I thought to ask in this forum.
If you want to help people, is better to give the answer than to insult them.
"Select where 1=1" give errors to me.
Thank you !
|
|
|
|
|
You've never run a command like this against a database?:
SELECT IDfieldName FROM someTable WHERE someCondition
You've never written an application that has used a database before, have you? That's the most ubiquitous query, used by every single application ever written that hits a database engine.
Hey, you wanted to find out if your database was up and running, right?? Possibly get the client "warmed up" so subsequent queries execute faster, right?? What better way than to run a small SELECT against it?
But, hey, after 35+ years of writing code, what do I know...
|
|
|
|
|
I was talking about the command "Select Where 1=1"
In this command "IDfieldname" and "someTable" are missing
Congratulations for your 35+ years of writing code , but I think is better to share with us some of your information without angry.
It's not shame to make even stupid questions.
Anyway , thank you !
|
|
|
|
|
You get an error on that SELECT WHERE 1=1 because it's not a valid query.
That's why I said put a table name in there. Im pretty sure MySQL has a master table or something similarly named.
|
|
|
|
|
dilkonika wrote: Sorry ! Don't be; my bad. The syntax is invalid, because I assumed you alread used such a query. It's a "SELECT * FROM WhateverTable WHERE 1=1 (or 1=0 to get no results); the idea is to send a bogus query whose result does not matter - it's not the result of the query that's interesting.
Performaning the "first" query when the computer starts is a way of cheating. The first query (the bogus one in this case) would still be slow. It would (should) force the db-server to wake up and load all that's required to handle a query.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello,
I am new to ASP.Net so forgive me if what i am asking is too basic.
I need to be able to update some particular cells of a DataGridView control.
The GridView has 5 columns but i want to update only two of the columns when a user clicks the "Edit" link.
My problem is:
1. How do i limit the cells to be updated to those two cells?
2. How do i update those cells by specifying an update query?
|
|
|
|
|
Felix Fosu wrote: I am new to ASP.Net You might want to consider the ASP.NET forum. You might also want to specify whether you mean the default DataGrid[^], or really a DataGridView[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
HI
Is there any way to set the priorities of the Pre-Requisites. I have created a setup in VS2008 and added all the pre-requisites. But not able to set the priority. For Example I have the following products as per pre-requisites:
MYSQL
DbCreate
Dot Net 4.0
I would like the priority to be
Dot Net 4.0
MySql
Dbcreate
Can anyone help me please?
|
|
|
|
|
There is no "priority" support built into MSI. If you want to support this kind of thing, you'd have to wrap your entire installation in a Setup.exe that your write yourself.
This .EXE would check to see if each product is installed and then launch the installers for them seperately.
|
|
|
|
|
SPSandy wrote: Is there any way to set the priorities of the Pre-Requisites That does not sound logical.
It's the installer that determines the priorities, based on dependencies; if DbCreate is using .NET, then it should either be contained in the package for DbCreate, or be listed as a dependency for DbCreate.
Why do you want to influence the order of execution?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks for the reply.
I will try to put my doubts in words.
As given in the example, Dot Net4.0 is a pre-requisite for the installation of MySql. And MySql is a pre-requisite for the execution of DbCreate.
This is the reason I am a little confused whether it will run according to this steps or will it just run whichever comes first.
|
|
|
|
|
SPSandy wrote: As given in the example, Dot Net4.0 is a pre-requisite for the installation of MySql. No, it's not. MySQL does not NEED .NET 4 to run.
IF it did, then the package that installs MySQL would need to install .NET 4; it would not be a separate install.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I am sorry but it does need Dot Net 4.0 to install and it does not come with the installer. It has to be installed separately. At least this is true for MySql Server 5.1
|
|
|
|
|
SPSandy wrote: I am sorry Don't be - you obviously tried it, and I'm merely whining about how they should have created their installer.
I've been Googling a minute for an MSI that includes .NET 4, but can't find it. Will be looking for a place to complain next.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have actually solved the problem of defining the steps for installer.
|
|
|
|
|
Hi
Thanks. I was able to sort out according to the required steps.
This issue can be treated as closed.
|
|
|
|
|
Hello which is the best way of connecting VB6 application with sql serverv 2000 ?
|
|
|
|
|
VB6 support ended in april 2008. Support for Sql Server 2000 ended in april 2013[^]. The combination will be limited to 32-bits, and, hence, 32-bit libraries and controls.
The "best" way to connect a VB6-application has not changed; you'd use ADOX as described. There's enough examples on the internet[^].
I'd also like to point out that there are FREE alternatives to the tools you named; VB.NET can be downloaded for free (search vb.net express) and same goes for Sql Server (search for sql server express). There's a LOT more examples on using those, as they have replaced the older tools.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|