|
Use a MaskedTextBox[^] instead, and set the mask to "SPR-&&&&&&&&&&&" where the number of '&' characters equals the max length of the input.
You can remove the underscore by setting the PromptChar property to space.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi,
I have a function which can add custom column types to my table.In that there is a provision to delete the columns also.So when deleting my column i need to check whether this column contains any data or not.How to do this>
Seeism
|
|
|
|
|
HI,
SELECT @vCount=('select COUNT(['+@v_COLUMN_NAME+']) from '+@DataTable)
print @vCount
This is my stored procedure part to find the count of a column specified.But here i m getting a conversion error
vCount is declared as int
|
|
|
|
|
I think that you may stand more chance of getting an answer to this if you post in the Database forum.
|
|
|
|
|
Hello,
I was wondering whats the proper way to name your global variables.
I use Visual Studio 2010, and I use two add-ons: ReSharper and Stylecop, to learn how make better code.
However, their advises are conflicting.
For example, if I'd have this code:
public class Example
{
private static object _staticExample;
private const object CONSTEXAMPLE = null;
private object normalExamle;
public void main()
{
this.normalExamle = "";
normalExamle = "";
}
}
(1): How am I suppose to call this? ReShaper tells me it should be _lowerCamelCase, however Stylecop tells me to not start with an underscore[^]
(2): What about all capital constants? I see them all the time. However ReShaper tells me it should be UpperCamelCase. Stylecop does not care about casing or it being full capital, only that the first letter is a capital.[^]
(3): How am I suppose to use the variable? Stylecop says I'm suppose to use this. (3.1)[^] However, when I do that ReShaper says this. is redundant, and that I should remove it (3.2).
Whats the right way to do this?
Thanks
|
|
|
|
|
I use what the Framework uses, "Pascal case"
DataTable , DataSet , BackColor , StreamReader
As it's the de-facto best practice.
However, so long as the code in your company is consistently using their style,
Then you're much better off getting used to it.
If every developer has their own standard, then there's no standard at all.
please have a look here
http://www.akadia.com/services/naming_conventions.html[^]
I know nothing , I know nothing ...
|
|
|
|
|
Different tools have different rules, some even allow you to change these.
Personally I agree with "_" rule on point 1 (as does Microsoft I *think*, it definately did at one point, but there is a glimmer of a memory that they may have changed their collective mind).
Capitalised Constants are probably a hangover from either Java or c++, we used to use CONST_EXAMPLE in c++. Microsoft suggests you use the CamelCase for these.(or I might have set up a rule in FxCop to do this).
Personally I use FXCop for this, work as it is the MS tool to do this.
ragnaroknrol The Internet is For Porn[^]
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
That's not global; it's private.
I don't use underscores, and I use lowercase for private members.
I suspect that the UPPERCASE habit is from C #defines.
|
|
|
|
|
Hi guys.
I wanna know if I add a windows.forms reference in my web project and use
System.Windows.Forms.SystemInformation.PrimaryMonitorSize
its a good thing.
or javascript window.screen.width its more recommended to web projects?
|
|
|
|
|
Managed code will run on the server, not the client; and it is likely to fail, as there is no user logged in, hence no primary monitor is known.
|
|
|
|
|
oh right!!
thanks dude
|
|
|
|
|
hi all
is there any 64bit hashing algorithm implemented in .net?
i am using .net 3.5 and need to encrypt a string with length of 3 to a byte array of length 8 or 10
for example :
hash("ABC")="!@?{%ER)@w"
any suggestion?
|
|
|
|
|
Take the first half of the MD5 hash. I don't know how many collisions it will create or if they are uniform but it may work?
|
|
|
|
|
hi
no i need a class implemented in .net some thing like MD5 Class .
but it have to generate byte array of length 6 to 10 (not 16 byte or higher).
|
|
|
|
|
I would read my post again. Last time I checked 16/2 = 8.
|
|
|
|
|
it would give ambiguous meaning
does anyone know something about this problem?
|
|
|
|
|
All hashing algorithms give ambiguous results. The number of expected collisions is directly proportional to the input size, output size and quality of the hashing algorithm. Read the Wiki page on the subject for more information about hashing.
|
|
|
|
|
Hi every body,
I’m working with the Crystal report in C# application, and using Linq to connect database in SQL server.
I need to create Crystal Report whose datasource not only one table but two and these two tables are related to each other with a foreign key, so I tried to join them then give the result to the report as a datasource but in the result I have repetition in data, I mean each row from the first table goes with all the rows from the other table so when there must be just 3 rows as a result I have 9 rows
can any body help?
|
|
|
|
|
This means that you don't have a real join in place. Basically, you are seeing a case where you are getting a many to many result back - your query should limit the results.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Thank you Mr.Pete O'Hanlon for your reply,
But what you have said is right and I guessed that, then I made sure that the returned rows from the query were without repitition ( I stopped the program while debugging and see the values)
I think that the problem might be when selecting the database fields for the report !!
What do you think and how to solve it ?
Thanks to be helpful
|
|
|
|
|
I suspect the reason why you're getting the results you are is because of the JOIN type that has been used in the SQL query. You'll have to craft the SQL statement to return your proper results yourself. You may want to read up on the different join types [^] to understand how they work before proceding.
|
|
|
|
|
Either You not using internal link in data sources at crystal report end or you not use grouping option for that
Akhil Khare
|
|
|
|
|
I made sure that I used internal link in data sources.
If I was using grouping option would it get ride of the repetition of data?
could you please tell me what is the main goal of grouping option.
Thank you for being very helpful
|
|
|
|
|
Actually when data will replicate then ther must be a comman data which are replicate so when we use th e group option on that particluar data feild then it grouped as per condition
e.g.
City Amount
DElhi 10000
DElhi 500
delhi 1500
Now after Group on CIty Feild it will
DElhi
---------> What u wanna to shown
|
|
|
|
|
I don't think that my pronlem will be sovlved using group option, because in the result I obtained there are some data seemed to be as a mixed data resaulted from joining, I mean there are some error data row and I don't want to group them but get ride of them ..
Please read my problem agin to see what is the exact problem !!
Thanks,
|
|
|
|