|
Once I install the sql server express on the U drive, then will I be able to access the management studio window from any machine which does not have sql server express installed in it's c drive?
Thanks
|
|
|
|
|
|
No.
Every PC that is going to manage that database with the management studio has to have the studio installed. You cannot just install the studio once and run it from anywhere. There are more than a few components that have to be registered on each PC that's going to run the management studio.
Once the studio is installed, you can manage the database on the U: drive.
|
|
|
|
|
If you have the administrator right you can instal at any drive.
|
|
|
|
|
|
how can i creat a report button for databse i have in c#
|
|
|
|
|
I think a little more information is needed. What do you mean by report button? a button that you click and see a ssrs report? or a report built from gridviews? or crystal?
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.
|
|
|
|
|
Add a button to your form.
Caption it 'Report for Database'.
Add an event handler that creates a report.
(Seriously, you need to at least make the effort to determine what your problem is. No-one is going to write a reporting system for you.)
|
|
|
|
|
|
Hi,
I have field in database and it is defined as Varchar(max).
And in the front in ADO.NET I am trying with the options
AddParamToSQLCmd(sqlCmd, "@Comments", SqlDbType.VarChar, -1,
ParameterDirection.Input, pArg.Comments);
SqlDbType.NVarChar, -1
SqlDbType.VarChar, -1
SqlDbType.NText, -1
and nothing seemed working. I am trying to insert over some 48000
charecters but it is storing only 43500 some charecters. Not sure if I
am missing some thing. Am I doing it right or can some one please help
me how to get around this issue.
Thanks in advance
L
|
|
|
|
|
|
I tried with the Text but the same thing it can't store more than 43567 charecters. I also tried updating the Text database field that I just created for testing in the management studio but no luck. For some unknown reason it is storing only 43567 charecteros of text.
Any inputs towards fixing this issue is greatly appreciated.
Thanks,
L
|
|
|
|
|
Ennis Ray Lynch, Jr. wrote: Varchar max is 8000, Nvarchar is 4000. If you need more than that use text.
Both of those links specifically mention 'varchar(max)' which takes 2 gigs.
And the OP is already successfully storing more than 8000 as well.
|
|
|
|
|
Huh, never actually noticed. I could have sworn MAX was a synonym for 4000 and 8000 respectively. Learn something new everyday.
|
|
|
|
|
|
Don't change the type around.
Isn't there a way to set the parameter without specifying a size? (I can't find a reference to 'AddParamToSQLCmd')
> but it is storing only 43500 some charecters.
Specifically, and in detail, how did you determine that?
|
|
|
|
|
Hi
I am learning C# from the microsoft "Visual C# 2010 step by step". It seems good but I have got stuck on one example which I have attached to the bottom. The code works but I don't know how. It creates a class called point which holds an x and y o-ordinate. It then offers a method calle distanceTo whoch calculate the distance between the current objects x and y values and another objects x and y values. Dead easy but in the distance method there is a line which says
int xDiff = this.x - other.x;
Where other.x is the x value from the point object passed into the method and this.x is the x value of the current object . Since x is defined as private in the method how does the c compiler know about the data in the other.x field though ?
Any ideas ?
Cheers
Dave
Here is the code, the method first followed by the calling program ....
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
#endregion
namespace Classes
{
class Point
{
private int x, y;
private static int objectCount = 0;
public Point()
{
this.x = -1;
this.y = -1;
objectCount++;
}
public Point(int x, int y)
{
this.x = x;
this.y = y;
objectCount++;
}
public double DistanceTo(Point other)
{
int xDiff = this.x - other.x;
int yDiff = this.y - other.y;
return Math.Sqrt((xDiff * xDiff) + (yDiff * yDiff));
}
public static int ObjectCount()
{
return objectCount;
}
}
}
-----------------------------------------------------------------------------
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
#endregion
namespace Classes
{
class Program
{
static void DoWork()
{
Point origin = new Point();
Point bottomRight = new Point(1024, 1280);
Point one = new Point();
double distance = origin.DistanceTo(bottomRight);
Console.WriteLine("Distance is: {0}", distance);
distance = bottomRight.DistanceTo(origin);
Console.WriteLine("Distance is: {0}", distance);
Console.WriteLine("No of Point objects: {0}", Point.ObjectCount());
Console.ReadLine();
}
static void Main(string[] args)
{
try
{
DoWork();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
|
|
|
|
|
The 'other' Point is passed as a parameter to the DistanceTo Method
like this
public double DistanceTo(Point other)
{
int xDiff = this.x - other.x;
int yDiff = this.y - other.y;
return Math.Sqrt((xDiff * xDiff) + (yDiff * yDiff));
}
and it is called with an instance of the point class like this
double distance = origin.DistanceTo(bottomRight);
So the compiler will know the value of 'other' point's x and y co-ordinates.
...and I have extensive experience writing computer code, including OIC, BTW, BRB, IMHO, LMAO, ROFL, TTYL.....
|
|
|
|
|
Partially correct, but I think Dave has understood the part you have explained.
Richard's answer explains what is missing from your answer which is that the private members of a class are available because the passed in object is of the same type.
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
First an instruction: please use <pre></pre> tags around your code to make it readable; use the "code block" button in the editor.
Second an answer: although the x fields are private they are accessible to any method of the class, and since other is an object of the same class then the DistanceTo() method can access it.
|
|
|
|
|
Because DistanceTo is a member of the Point class.
|
|
|
|
|
A class is not equal to an object, but rather a template from which you can create multiple objects.
In this case you use object A's method to compare it with object B, both A and B are instances from the same class.
so if you use the compare method of Object A and pass it a parameter object B, both have the same properties.
maybe it makes more sense if you create (just for tests) a class C that has something like this:
public bool CompareObjects(ClassInstance A, ClassInstance B){
bool success = false;
if(A.x == B.x and A.y == B.y){
success = true;
}
return true;
}
in this sample you see that A and B are both objects instanciated by the ClassInstance class.
Hope this helps.
V.
|
|
|
|
|
The accessibility keywords (such as private ) apply to the entire class, not to the individual instances; therefore if this Point can access the other Point, it can certainly access all its members.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I just wanted to say thanks to all those that have taken the time to answer this. You have all helped and I understand what is going on now. Although I didn't describe exactly what was confusing me some of you spotted it - how can I use something private in another object but after reading the answers I understand better that private variables are available to any object that is a member of the class. Thanks very much for putting me right.
Cheers
Dave
|
|
|
|
|
In programming point of view Which is more usefull Abstract Class or Interface and Why?
|
|
|
|