|
Peterson Luiz wrote: When I set the typeConverter of the property at my userControl to be the type of the above class, it works. The control's property diplays the test strings in a comboBox.
But when I try to bring this strings from a dataBase, it doesn't work.
What do you mean "it doesn't work?" Does it throw an error, does it return nothing? When posting a question be as descriptive as possible.
Peterson Luiz wrote: I've already tried this:
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
ArrayList permissions = DataBase.GetPermissions();
return new StandardValuesCollection(permissions);
}
Anybody has can help me?
Have you tried setting a breakpoint on the return to see what the values in your permissions ArrayList ? If it doesn't throw an error, maybe you aren't returning anything from your database.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Hello,
When I said it doesn't work, I get an NullReferenceException. But, if I put the same code somewhere else and try it in runtime, it works perfectly. It returns all the strings I want from the database. So, the code is right, but doesn't work in design mode, with the usercontrol.
I get the NullReferenceException at the line
ArrayList permissions = DataBase.GetPermissions();
Thanks
Peterson
|
|
|
|
|
Peterson Luiz,
I think you just answered your own question. By the sounds of it, you're trying to view information in design mode when you don't have a database connection.
Either, put the below at the top of your method to stop the method accessing the database:
If (DesignMode)<br />
return;
OR. When ever you call the object DataBase, check if its null and create a new instance.
Regards,
Gareth.
|
|
|
|
|
Hi,
How do we decide which data provider to use from ADO.NET?
How do I decide if I need to use SQLClient or Oledb data provider for my SQL Server database.
The answer that I got for this question from my collegues is that "coz SQL Client is optimized to be used for SQL Server", is that the only reason?
Regards,
Blumen
|
|
|
|
|
Hi Blumen,
Yes, the SQL set of classes are designed for SQL Server and the OleDb are for Access.
Regards,
Gareth.
|
|
|
|
|
gareth111 wrote: Yes, the SQL set of classes are designed for SQL Server and the OleDb are for Access.
OleDB uses OLE DB providers underneath which can connect to SQL Server, Access, CSV files and so on. It was not solely or optimised "for Access" as you seem to imply.
|
|
|
|
|
So whats the point in having so many data providers, ODBC for example?
|
|
|
|
|
hi ,
when any one trying to register birthdayreminder.com or some
other websites , it will ask whether to import mail id's from existing
account or entering manually.
can any one explain , how they are importing the contacts from our address book ??? and how we can do it in C#.net ..
thanks
Suman
|
|
|
|
|
That has to be one of the most annoying and insecure features ever. Who in the right mind would give their login details for their email to some website?
|
|
|
|
|
yeah, facebook does that aswell, that was point where I found the unsubscribe me from this service button
|
|
|
|
|
originSH wrote: Who in the right mind would give their login details for their email to some website?
A lot of people, that's who.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
That is why I hate people who do the whole social networking thing, such as facebook or myspace. 95% of them are just pathetic, very un-intelligent people who are begging to be accepting and "definded" by anyone or anything. These are the people who have to add 100's of people to their "friends list," people whom they don't or barely know. They think that their MySpace page layout, graphics, and the sh*tty music they play there says a lot about their personality.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
"This world is a comedy to those that think; a tragedy to those that feel." - Horace Walpole.
I think he got it the other way round.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
lol the answer is "an idiot" ... combined with your observation that means theres lots of idiots ... hehe so this is just another way to prove the stupidity of users
|
|
|
|
|
hi ,
if u know that procedure pls tell me how they will do that ..
thanks
|
|
|
|
|
No, I will not help people with anything that I think is illegal, unethical, or irresponsible.
|
|
|
|
|
I mean getting all IP addresses in Default Gateway in LAN...
venki
|
|
|
|
|
Have tried searching Google[^]? As I saw someone say yesterday, one of the most important skills a developer should have, is the ability to research on your own.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
if i understand your question all you need to know is your current ip address and your subnet mask.
MrPlankton
|
|
|
|
|
Short of using your subnet and attempting to ping all the possible combinations, there's no easy way.
|
|
|
|
|
Hi
I am working on a desktop application using C#.NET. I am using Crystal Reports for reporting. At a certain point in application I change the culture of CurrentThread.i.e
//System.Globalization.CultureInfo abc = new System.Globalization.CultureInfo("en-US");
//System.Threading.Thread.CurrentThread.CurrentCulture = abc;
This change is reflected in the application and of course in crystal Reports. When I set the Date Format of CurrentThread.
//System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.ShortDatePattern = this.DataSet.DataTable[0]["dt_format"].ToString();//this is date format e.g dd/MM/yyy
The change is reflected in tha application but my crystal reports donot reflect any changes. How can I make Crystal Report to take effect of this change. Is there a way this change can be reflected to crystal reports as well.
Can anybody help me what I should do?
I will be really grateful.
Azif
|
|
|
|
|
i have developed a windows service.
This service updates a sql express database. On running the service, the service gets hang and the event viewer shows .sqlexpection.
Is there any way i can debug an installed service. I dont have .net ide installed in the system where service is isntalled. More over the sql express database is in another system. Can you tell me what should be the connection string, if the server name is dev-sqlx and db name is report
thanks and regards
hari
|
|
|
|
|
You'll likely have to introduce a Thread.Sleep() in the service code to give you enough time to attach your debugger to the process.
I've never tried to debug a service remotely. You can google for the connection string.
Cheers,
Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
|
|
|
|
|
i just want to activate the debugger before the service crashes.. is there any specific way in windows to activate this?
|
|
|
|
|
Put a System.Diagnostics.Debugger.Launch() call in your code where you want the debugger to start.
-----
You seem eager to impose your preference of preventing others from imposing their preferences on others. -- Red Stateler, Master of Circular Reasoning and other fallacies
If atheism is a religion, then not collecting stamps is a hobby. -- Unknown
God is the only being who, to rule, does not need to exist. -- Charles Baudelaire
|
|
|
|