|
Thanks leppie!
1.
You mean such situation is normal when debugging release version? And no way to solve?
2.
leppie wrote: Why dont you just log the value in a logfile in stead?
I want to debug without changing the existing code.
regards,
George
|
|
|
|
|
George_George wrote: You mean such situation is normal when debugging release version? And no way to solve?
Yes, it is called optimization, for starters it strip's all symbol names.
George_George wrote: I want to debug without changing the existing code.
Not possible.
|
|
|
|
|
Thanks leppie,
Actually, if all symbols can not be displayed, I will not be so surprised. My confusion is why only a part of local variable can not be displayed?
regards,
George
|
|
|
|
|
This is my code to register a channel,
public static void startServer()
{
try
{
ChannelServices.RegisterChannel(channel); // exception occurs RemotingConfiguration.RegisterWellKnownServiceType(typeof(Messanger.ItvMessage), "testMessage", WellKnownObjectMode.SingleCall);
}
catch (Exception ex)
{
throw ex;
}
}
Here I am getting exception saing,” The channel 'tcp' is already registered”….
Are there any condition to check channel already registered or something..validation/….
|
|
|
|
|
This is my code to register a channel,
public static void startServer()
{
try
{
ChannelServices.RegisterChannel(channel); // exception occurs RemotingConfiguration.RegisterWellKnownServiceType(typeof(Messanger.ItvMessage), "testMessage", WellKnownObjectMode.SingleCall);
}
catch (Exception ex)
{
throw ex;
}
}
Here I am getting exception saing,” The channel 'tcp' is already registered”….
Are there any condition to check channel already registered or something..validation/….
|
|
|
|
|
Hai,
I am with a InventoryManagement C# windows application, how can I make a setup package for my application which prompts a serial number while installing the setup and also how can I add my icon to the setup project
Thanks in advance
Anu Palavila
Thanks & Regards
|
|
|
|
|
hey guys
does anyone know what the newline char is for MS-SQL2000?
i need to be able to INSERT it in a text column from my front end, and view it on a DataGridView and crystal reports...
i googled but didn't find anything useful, is it even possible?
any ideas?
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
It depends on where you are displaying the data. If it is on an ASP.NET page then newline char will be <br> . Try Environment.NewLine
|
|
|
|
|
WinForms app, it will be displayed on a DataGridView and Crystal Report
Environment.NewLine has the same affect as "\r\n"...
i just noticed that its displaying correctly on the crystal report, but im seeing the square-like character in the DataGridView which is where the data is seen before the report is generated.
is there may be some property on the DataGridView to make it interpret the new line as a new line instead of the square-like character?
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Looks like it don't support displaying multi line text. I am not sure about making gridview to display multi line text.
|
|
|
|
|
I have a while loop in my code...
for example, while (i<5)
{
do something
}
I want to read the value '5(the number specified in config file)' from app.config file. How do I go about it?
Basically I want to say the number of iterations from the config file.
Thanks for any suggestions.
Tina_K
modified on Tuesday, July 8, 2008 11:25 AM
|
|
|
|
|
int myCounter = Int32.Parse(ConfigurationManager.AppSettings["NumberOfLoops"]);
while (myCounter < 5)
{
doStuff();
}
remember to add using System.Configuration;
hope it helps
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Thanks, it worked great.
Tina_K
|
|
|
|
|
hi
Iam using report viewer to generate reports.But with the following error.what is this and how can it be solved.
"An error has occurred during report processing.
Exception has been thrown by the target of an invocation.
Object reference not set to an instance of an object."
And i cannot debug to see the expection can any one help out.
Thanks.
|
|
|
|
|
Hi
This link may help you to learn all about report viewer
www.gotreportviewer.com
Thanks & Regards
|
|
|
|
|
Hi,
I'm building an application for versioning purpose.
Though this versioning system is different from our regular software versioning applications like WinCvs, VSS etc (as my versioning system has more of the domain essence to it), the basic architecture would still remain same.
There is our client application containing some versionable elements, from which we trigger new versions, which would be stored in a repository at a server.
Here I'm stuck with the communication channel. I've figured out 2 ways of doing it
1. Using sockets
2. Remoting
Primarily there is only transfer of files involved between the client and the server.
I'd like to know which is the better way to go about it.
Also is there any other approach apart from remoting and sockets to form a client - server app with this kind of requirements?
Thanks in advance
Naren
|
|
|
|
|
OK. Remoting also uses 2 types of channels TCP and HTTP for communication and both are sockets.
As you specified if just File Transfer is involved then you should use the Socket to avoid some complex programming. but using Remoting you will have more control over it. i.e. calling a method or invoking a event at the server. so think about the functionality of the application and decide it.
Socket is more simple to implement over Remoting
and
Remoting has much more control and security over Socket.
|
|
|
|
|
I cant make a full dynamic query in LINQ
I have 2 situation methods (only_exp_query, only_tbl_query) those are working.
...
using System.Linq.Dynamic;
using System.Data.Linq;
...
string connString = @"Data Source=.;Initial Catalog=Northwind;Integrated Security=True";
DataClasses1DataContext db = new DataClasses1DataContext(connString);
...
private void only_exp_query()
{
var query = db.Customers
.Where("City=@0", "LONDON")
.OrderBy("CompanyName");
dataGridView1.DataSource = query;
}
private void only_tbl_query()
{
Table<customer> _customer = db.Customers;
var query = from tbl in _customer
select tbl;
dataGridView1.DataSource = query;
}
But i want to run the script below , but it is not working...
private void full_query()
{
var query = db.GetTable("Customers")
.Where("City=@0", "LONDON")
.OrderBy("CompanyName");
dataGridView1.DataSource = query;
}
and then i can try this below script...
private void full_query()
{
Assembly asm = Assembly.GetAssembly(typeof(DataClasses1DataContext));
var query = db.GetTable(asm.GetType("Customer"));
.Where("City == @0 and Orders.Count >= @1", "London", 10)
.OrderBy("CompanyName, City")
.Select("New(CompanyName as Name, Phone)");
dataGridView1.DataSource = query;
}
but it returns the following error:
"ArgumentNullException was unhandled ,Value Cannot be null,Parameter Type"
but i dont know this error.
WHAT CAN I DO?
can you help me please
|
|
|
|
|
mucahit wrote: but it returns the following error:
"ArgumentNullException was unhandled ,Value Cannot be null,Parameter Type"
but i dont know this error.
That is caused by: asm.GetType("Customer")
So make sure that value returned is not null.
|
|
|
|
|
first of all, thank you for help.
it is possible,
but what can i do this error message?
What can i do full dynamic query in LINQ?
|
|
|
|
|
The problem was solve
thats;
we can change this rows
Assembly asm = Assembly.GetAssembly(typeof(DataClasses1DataContext));
var query = db.GetTable(asm.GetType("Customer"));
new row
Table<customer> _customer = this.Context.GetTable( typeof(Customer) ) as Table<customer>;
thank you, leppie
|
|
|
|
|
How to Identify Smart card reader on PC?
Which API should be used to pick data from these readers.Can you give me small example or link?
Thanks in Advance.
|
|
|
|
|
I have two factory classes that both return a generic list of a data object class. Currently the code is using a switch statement to call a particular factory depending on some input. Code below the switch statement below depends on getting the list of data objects from different sources, but processing them the same.
List<Product> products = null;
switch (i)
{
case 1:
products = ProductFactory.GetProducts();
break;
case 2:
products = ItemFactory.GetItems();
break;
default:
break;
}
The problem is that if I want to add more factories from different sources... I would have to rewrite the code for the current builder class, i.e. add more statements to the switch. Since an unknown number of factory calls could be made to get the data objects from different sources (one factory returns from Oracle, one from SQL one from SAP, etc) the code needs to accommodate any new factory sources without having to recode.
Is there an easy way to accomplish this, please show me some sample code if there's a way to do so.
Thanks
-----------------------------
If you don't go after what you want, you'll never have it.
If you don't ask, the answer is always no. If you don't step
forward, you're always in the same place. -Nora Roberts
|
|
|
|
|
I guess you need a FactoryFactory.
Like you 'lookup' them by index now, just place it in a list (array), and lookup the index.
|
|
|
|
|
Hi there, I'm not sure if I followed what you meant here? Could you perhaps show me some sample code? I'd really appreciate it!
-----------------------------
If you don't go after what you want, you'll never have it.
If you don't ask, the answer is always no. If you don't step
forward, you're always in the same place. -Nora Roberts
|
|
|
|