|
I'm sorry, I have no clue why that happens. I PM you another address.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
Well , friends , you made a lot's of comments , but can I have a final solution of my problem ?
Thank you !
|
|
|
|
|
Not all problems can be identified or diagnosed in a couple of forum posts. Any maybe your problem is rather uncommon so maybe no one here has experienced it himself yet or the right person to answer your question hasn't visited this forum yet. You'll either need to be more patient or conduct some research yourself: You could make a backup of your project and database and strip things out one by one in order to identify the relevant factors.
edit:
Theoretically it could also be not directly related to EF but some of your code that for whatever reason gets executed too for every first query. I assume you haven't profiled your code yet - get some profiler and take a look at your query execution:
https://www.google.com/search?q=c%23+performance+profiler&ie=utf-8&oe=utf-8[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
modified 26-May-15 0:18am.
|
|
|
|
|
Is it possible to have a different forecolour on line 1 of the tooltip display? Thanks.
|
|
|
|
|
Sure; you'd have to implement it though, as it is not default functionality of the tooltip. I'd suggest you search this site as it contains examples (with code) on how to personalize tooltips.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I've had a good look around and can't find anything on colours on the first line.
Any links or other pointers you have would be very welcome. Thanks.
|
|
|
|
|
|
Thanks Eddy. Checking it out. I do want a different forecolor on line one (compared to the rest), and your first link mentions a Title color and Description color.
|
|
|
|
|
You're welcome
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello !
I have an vb.net 2013 application that use a SQL server database.
Currently I'm using sql server 2008R2.
To Backup / restore database from vb.net I'm using SMO.
But the problem is that when I try my application on sql server 2012 , the backup / restore functions doesn't work anymore , because the SMO files that my application use are for sql server 2008R2.
So I'm thinking is there any way to Backup restore a database that is independent from SQL server version ?
Thank you !
|
|
|
|
|
Create a backup script and execute it?
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
|
The simplest script would be like
BACKUP DATABASE MySQLDatabase
TO DISK = "C:\backups\MySQLDatabase.bak";
You can execute this against your database connection, after changing the database name and file location of the backup file to match your own values.
There are quite a few options to the BACKUP command, but this shows the absolute simplest case. For more details, have a look here:[^]
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
The SMO-libraries are for a specific version of SQL Server. You can use the backup and restore -commands without SMO. That way it should be possible to restore your backup on a newer (!) version of SQL Server. AFAIK, it doesn't work the other way around.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thank you !
But as I'm comfortable using SMO , is there any way to keep in different fodders , SMO files for a specific version of SQL server, and to alter when I need ? ( just an idea , I don't know if this can work ).
|
|
|
|
|
I'd recommend against using SMO for operations that can be performed using native SQL commands, as it adds a dependency to a specific version of SQL Server. It is also a lot easier to change a SQL-script when there's a need due to difference between versions.
Yes, it is possible to use "all" the SMO libraries, for each different version - but that is definitely not easier; first of all, you'd need to link to various libraries containing the same types and classes, which is something that is usually not done as it creates conflicts.
You could prevent so by loading the library dynamically, using reflection to do what you want - which adds more complexity. Alternative, you decompile the SMO-assemblies and stitch them together into a new one.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Can you give me some help , or where can I read more about Loading the library dynamically ?
Thank you !
|
|
|
|
|
Loading stuff using reflection is not explained in a single post, it is a complete topic by itself. There's articles on CodeProject like "Reflection in .NET[^]", and an article from Visual Studio Magazine[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
It cannot be done by simply replacing the assembly, nor by mapping it.
Hence, the recommendation for SQL.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
You need to listen to what is being said here, there is a difficult way of doing things, SMO and swapping libraries, and there is an easy way of doing things, TSQL and a stored procedure/query.
If you insist on going down the difficult path then you need to do a shed load of research while reading the recommended article on TSQL should be relatively simple.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I want to know the algorithm for balancing chemical equations
|
|
|
|
|
|
This does not even appear to be a programming question.
|
|
|
|
|
Hello !
I don't want all the items that a default textbox's context menu contains.
So I'm using a custom context menu :
Dim contextMenu = New ContextMenu()
contextMenu.MenuItems.Add(New MenuItem("Copy", Sub(s, ea) textBox1.Copy()))
contextMenu.MenuItems.Add(New MenuItem("Paste", Sub(s, ea) textBox1.Paste()))
contextMenu.MenuItems.Add(New MenuItem("Undo", Sub(s, ea) textBox1.Undo()))
contextMenu.MenuItems.Add(New MenuItem("Select All", Sub(s, ea) textBox1.SelectAll()))
textBox1.ContextMenu = contextMenu
But the problem is that now , all these commands are always enabled even in some cases when shouldn't be. for example even nothing is copied , the Paste command is enabled. Event the textbox is empty and nothing is selected , the Copy command is enabled.
----Is there a way to fix this behavior ?
----Or maybe is there a way to not use a custom menu . but just to hide the items that I don't want in the default context menu , using TextBox.ConTextMenu.Popup event ?
Thank you !
|
|
|
|