|
Sorry, I must have read what I thought he was saying rather than than the actual code. I'll have to get these glasses checked!
|
|
|
|
|
Is it possible the the objectarray contains null values?
Try this:
ArrayList list = new ArrayList();
foreach (obj in objectarray)
{
if (obj != null)
list.Add(obj);
}
|
|
|
|
|
Even in that case, he should be getting null values when he indexes into the array, not exceptions.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
That's right, but I assume he didn't just iterate but also tried to call some method on those elements.
|
|
|
|
|
There were nulls in the arraylist. I was populating it by traversing a RedBlack Tree (similar to a B-Tree), and I forgot to check for the nil nodes. Once I added the check for nil nodes in, the problem was solved.
I guess that if you add nulls to an ArrayList, adding a watch on that ArrayList will only show the non-null components. The thing that I still don't understand is why I keept getting an exception when I tried to retrieve the elements. Even if the element was null at a given index, I should get a null result, not an exception. Regardless, the problem is solved now. Thanks for all the replies.
|
|
|
|
|
Ok, i have finished my project. i wanna send it to a friend. what do i do. with visual studio 6, there was (make exe file). how do u do that with .net?
thanx in advance.
|
|
|
|
|
|
and where do i find that?
|
|
|
|
|
|
|
Hi,
Please help me it is urgent.
there is only .Net Framework and crystal controls are installed on web server and when i am trying to run following code on server it gives error of Logon Failed.
I face a strange error of Logon failed when i would apply following code to Crystal Engine.
I provide following code for make connection to report.
********************************************************
Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
For Each tbCurrent In Session("Report").Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = ConfigurationSettings.AppSettings("strServerName")
.UserID = ConfigurationSettings.AppSettings("strUserID")
.Password = ConfigurationSettings.AppSettings("strPassword")
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
Next tbCurrent
**********************************************************
Please Help me .
If there is other alternative for applying Connections to crystal report then please help me.
when i apply same code to server when whole .net studio installed it works fine.
I am using OleDB Connections for Oralce for your kind information.
So i want to know which crystal decisions files are installed when we install only .Net framework on server.
Thanx.
Parimal Patel
(S/W Developer)
Parimal Patel
(S/W Developer)
|
|
|
|
|
What is the use of MarshalByVal?
How to use that?
|
|
|
|
|
|
Hi,
Can anyone provide me code for accessing different versions of assembly in GAC at runtime through Reflection. Is it possible in any other way.. Please let me know..
Thanks
|
|
|
|
|
So I have a remoting program (service) running under a Windows Service at the server. This service in time needs to latebind to another assembly in the server machine.
On the other side sits the client application: this is a Web Application that needs to connect to the service (not a WebService) to obtain TRUE/FALSE generated by the the latebound assembly in the server.
When we run the thing we get a Remoting Exception error telling "Server error...blah, blah,...unknown remoting error" really not much to hold on to.
MORE INFO
The user of a Web App are of course ANONIMOUS, that means we don't have credentials for any of them, so we set "Authentication" to NONE in the client.
|
|
|
|
|
I am generating the columns of datagrid with auto generate column is true.I want to make only one column as hyperlink.How can i do that in vs.I am using vb.net
Thanx in anticipation
Take it easy...
|
|
|
|
|
Hi tayyab_mit,
One method is you can write code in datagrid itemdatabound event handler.
There you can create a hyperlink control and can set its text and link.
Finally add the hyperlink control to the datagrid column.
(this is c# code, make changes accordingly)
if( e.Item.ItemType == ListItemType.Item e.Item.ItemType == ListItemType.AlternatingItem )
{
HyperLink hlc = new HyperLink();
hlc.NavigateUrl = "http://www.codeproject.com";
hlc.Text = "codeproject";
//finally we add the created control to datagrid cell control collection
e.Item.Cells[0].Controls.Add(hlc);
}
charmis
|
|
|
|
|
So how is it if datagrid of windows application?
|
|
|
|
|
Hey everyone. I've been out of the programming world for a number of years and would like to upgrade my knowledge. I don't need tutorials regarding how to program, per se, but rather an overview of the strengths/weaknesses of the differing languages.
I'm new to the whole .net and C# world but have a strong understanding of programming principles and language structures, etc. I've worked with MFC in older versions of Visual Studio, although only in C++. I havn't touched VB since the mid '90s but if it has improved I'm not adverse to giving it another try.
Where should I go to find good overviews of .net and C#, as well as changes to the visual studio interface?
Thanks - mutty
|
|
|
|
|
|
|
Hello Everybody:
In somewhere I read that with the tool cl.exe that comes with .NET Framework 1.1 is possible to compile standar C or C++ code.
So I tried to compile the classical example code.
Lets name it as hello.c.
Here it is the content of the source:
------------------------
#include <stdio.h>
int main(void)
{
printf("Hello\n");
return 0;
}
-------------------------
But when I enter in the command line:
F:\>cl hello.c
This is what I see on console:
---------------------------------------------------------------------
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved
hello.c
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
/out:hello.exe
hello.obj
LINK : fatal error LNK1104: cannot open file 'LIBC.lib'
------------------------------------------------------------------------
Thats all!: I got only the object file but not the executable.
I checked that LIBC.lib does exist in F:\Archivos de programa\Microsft Visual Studio .NET 2003\Vc7\lib and my LIB enviroment variable is set to that PATH.
Somebody could tell me what I am doing wrong?
Am I missing something?
I will appreciate any help.
tejasbill
|
|
|
|
|
I think your lib files need to be specified on the command line.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ensure you're launching cl.exe from your 'Visual Studio .NET 2003 Command Prompt', in the start menu (this may be translated!) under Visual Studio .NET 2003 > Visual Studio .NET Tools. Alternatively, run vsvars32.bat in %ProgramFiles%\Microsoft Visual Studio .NET 2003\Common7\Tools.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Christian and Mike, thanks to both for the answers.
I have installed the .NET Framework 1.1 runtime and SDK and not the Visual Estudio .NET 2003 IDE.
I have discovered that now I can't recompile others standard sources in C++ that a month ago I was able to compile without problem. Now I got the "LINK: fatal error LINK1104: cannot open file LIBC.lib". I am suspecting that the file LIBC.lib has become corrupted for something ocurred in the meantime.
tejasbill
|
|
|
|