Wednesday, March 28, 2012
Mapped Drive
I go into the properties and select the database tab and select the ...
box to list my drives, the shared drive does not show up. If I go ahead
and enter the path of where I want the files to be located on the "mapped"
drive, it accepts it, but does not use it when I create a new database.
My situation is I have 2 computers in a single room and I want then to be
pointed at the same file location for all databases... Both machines have
MSDE version of sql server loaded...Can I somehow point one machine to the
second machines SQL server such that we are working on the same database?
Any ideas/suggestions'> MSDE version of sql server loaded...Can I somehow point one machine to
the
> second machines SQL server such that we are working on the same database?
I don't think you can share databases between engines (even between
instances on the same machine).
Why not just point one machine's client tools to the other machine's SQL
Server? Then one machine will be working locally, and the other will be
working "remotely" so to speak. But they will be working on the same copy
of exactly one database.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||No.
First, SQL does not support mapped drives for database or transaction log
files.
Second, when SQL does open a database file, it is completely exclusive for
that server instance. Even a second instance on the same host nod could not
access the same underlying database files.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Jim Heavey" <JHeavey@.nospam.com> wrote in message
news:Xns9495971974DBBJHeaveyBDUP@.207.46.248.16...
> Can I make my "default location" for new databases be a mapped drive?
When
> I go into the properties and select the database tab and select the ...
> box to list my drives, the shared drive does not show up. If I go ahead
> and enter the path of where I want the files to be located on the "mapped"
> drive, it accepts it, but does not use it when I create a new database.
> My situation is I have 2 computers in a single room and I want then to be
> pointed at the same file location for all databases... Both machines
have
> MSDE version of sql server loaded...Can I somehow point one machine to
the
> second machines SQL server such that we are working on the same database?
> Any ideas/suggestions'
Monday, March 12, 2012
Manipulating a text box in custom code.
Hi there,
A simple question I hope. I have got a textbox on a report and I'm trying to populate it by calling a custom assembly. I know I can reference it directly in the textbox (this works) but I am trying to do this from the code block. The following code didn't work:
Protected Overrides Sub OnInit()
ReportItems!textbox2.Value = POCCustomAssembly.CustAssembly.Hello()
End Sub
The TextBox is called textbox2 and the custom assembly simply returns a string.
I get an error message "The is an error on line 1 of custom code: [BC30469] Reference to a non-shared member requires an object reference".
What am I doing wrong?
Hi,
I know you submitted this months ago...but I was wondering if you found the solution to your problem? I essentially am trying to do the exact same thing and can't figure out the error. I would appreciate any help.
|||The error message you're getting suggests that the code wouldn't even work in the textbox value property, although the message could be wrong and misleading.
Is the method you have in your assembly "Shared" (VB) or "static" (c#)?
If not, try to make it shared/static. If that's not possible to do,
you can add objects to the report in Report > Report Properties > References > Classes
add the class name and your desired instance name for the object. Then you can use this instance name in your custom code.
|||Thank you for the responose. Here is my code:
I basically wrote an assembly to calculate percentages and handle situations to divide by zero.
namespace Calculations
{
public class calcPercentage
{
public decimal Percentage(decimal decValueOne, decimal decValueTwo)
{
decimal decPercentage = 0;
if (decValueOne == 0 || decValueTwo == 0)
{
decPercentage = 0;
}
else
{
decPercentage = (decValueOne - decValueTwo) / decValueOne;
}
return decPercentage;
}
}
}
Then in my textbox I put:
=Calculations.CalcPercentage.Percentage(SUM(Fields!PreviousYTDExpenseAmount.Value, "Template_OutputData_Sales"), SUM(Fields!PreviousYTDExpenseAmount.Value, "Template_OutputData_CGS"))
I referenced the assembly and added it to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies and I still get that error message so I do not know what the problem is.
Then after carefully reading your response, I realized I didn't write "static" in my method even though that's what I meant it to be. Now the program builds successfully but when I run it and try to produce the PDF file it catches on error when it tries to render it as a PDF. Now to figure out that error...which I will save for tomorrow....I must have screwed something up in the process.
Thanks so much for you help! If you have any suggestions about my next error...i'm all ears!
|||Also, when I removed the assembly from my report and reran it they worked fine...so if you have any suggestions let me know.|||
I cannot get the report to render to design mode while using a custom assembly. As soon as I remove the assembly, it works just fine. can anyone suggest what might be the problem? All my code is listed above and what steps I have already taken.
Thanks!
|||Any custom assemblies used for SSRS must be declared SHARED for VB or STATIC for C#.
So for instance:
vb sample:
Public Class Class1
Public Shared Function CallMeIshmal() as string
Return "Call Me Ishaml"
End Function
Any other functions or subs must also be declared as Shared or Static.
You also need to either add the compiled dll to the GAC or copy it to the reportserver and reportbuilder directories.
You may also need to modify the reportserver.config file for permissions.
this link:
http://support.microsoft.com/default.aspx/pwebcst
has a list of webcasts, the first one is about using custom assemblies in SSRS>
Daryl
Manipulating a text box in custom code.
Hi there,
A simple question I hope. I have got a textbox on a report and I'm trying to populate it by calling a custom assembly. I know I can reference it directly in the textbox (this works) but I am trying to do this from the code block. The following code didn't work:
Protected Overrides Sub OnInit()
ReportItems!textbox2.Value = POCCustomAssembly.CustAssembly.Hello()
End Sub
The TextBox is called textbox2 and the custom assembly simply returns a string.
I get an error message "The is an error on line 1 of custom code: [BC30469] Reference to a non-shared member requires an object reference".
What am I doing wrong?
Hi,
I know you submitted this months ago...but I was wondering if you found the solution to your problem? I essentially am trying to do the exact same thing and can't figure out the error. I would appreciate any help.
|||The error message you're getting suggests that the code wouldn't even work in the textbox value property, although the message could be wrong and misleading.
Is the method you have in your assembly "Shared" (VB) or "static" (c#)?
If not, try to make it shared/static. If that's not possible to do,
you can add objects to the report in Report > Report Properties > References > Classes
add the class name and your desired instance name for the object. Then you can use this instance name in your custom code.
|||Thank you for the responose. Here is my code:
I basically wrote an assembly to calculate percentages and handle situations to divide by zero.
namespace Calculations
{
public class calcPercentage
{
public decimal Percentage(decimal decValueOne, decimal decValueTwo)
{
decimal decPercentage = 0;
if (decValueOne == 0 || decValueTwo == 0)
{
decPercentage = 0;
}
else
{
decPercentage = (decValueOne - decValueTwo) / decValueOne;
}
return decPercentage;
}
}
}
Then in my textbox I put:
=Calculations.CalcPercentage.Percentage(SUM(Fields!PreviousYTDExpenseAmount.Value, "Template_OutputData_Sales"), SUM(Fields!PreviousYTDExpenseAmount.Value, "Template_OutputData_CGS"))
I referenced the assembly and added it to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies and I still get that error message so I do not know what the problem is.
Then after carefully reading your response, I realized I didn't write "static" in my method even though that's what I meant it to be. Now the program builds successfully but when I run it and try to produce the PDF file it catches on error when it tries to render it as a PDF. Now to figure out that error...which I will save for tomorrow....I must have screwed something up in the process.
Thanks so much for you help! If you have any suggestions about my next error...i'm all ears!
|||Also, when I removed the assembly from my report and reran it they worked fine...so if you have any suggestions let me know.|||
I cannot get the report to render to design mode while using a custom assembly. As soon as I remove the assembly, it works just fine. can anyone suggest what might be the problem? All my code is listed above and what steps I have already taken.
Thanks!
|||Any custom assemblies used for SSRS must be declared SHARED for VB or STATIC for C#.
So for instance:
vb sample:
Public Class Class1
Public Shared Function CallMeIshmal() as string
Return "Call Me Ishaml"
End Function
Any other functions or subs must also be declared as Shared or Static.
You also need to either add the compiled dll to the GAC or copy it to the reportserver and reportbuilder directories.
You may also need to modify the reportserver.config file for permissions.
this link:
http://support.microsoft.com/default.aspx/pwebcst
has a list of webcasts, the first one is about using custom assemblies in SSRS>
Daryl
Monday, February 20, 2012
Management Studio Very slow to open
Hi,
I've had this problem with a VM and now on the Live box. I installed Windows Server 2003 SP1, then install SQL server 2005 and applied service pack 1.
As an administrator Management Studio takes approximately 2 seconds to open. However, if I log in to windows with any other local user account Manangement Studio takes approximately 1.5 minutes to open.
The whole interface is slow unless I use the administrator account to log into windows.
If anyone has a solution I would be very greatful as this is a new build for our production environment.
Thanks in advance.
Iain
Not sure if this will help, but if you have a look at internet explorer, on tools, internet options, advanced, security, check for publishers certificate revocation. I believe the default is enabled (ticked). On out NON-INTERNET facing DB machines, we have disabled that, and see a significant improvement in SSMS 'opening' time. I have heard that SSMS 'calls home' to check soemthing, and that by disabling this option, it no longer does this.
As I have it, the reason it can take so long is that on a non-internet facing machine, it waits for a timeout there.... true or not true ? I'm not sure, but I do know we are seeing a significant improvement
|||https://blogs.msdn.com/euanga/archive/2006/07/11/662053.aspx
|||Thanks very much for post. I'm teaching it on XPsp2 machines and the timeout was about 10 mins. Very annoying and this fix sorted it straight away takes 1 second to open now. :)