This project has moved. For the latest updates, please go here.

Variable(,) column limit?

Topics: usage (how to ...)
Dec 1, 2008 at 9:00 PM
Is there a limit on the number of columns GetUpperBound(0) for a Variable(,)?

Using the MIB Browser I am able to see about 18 columns, but I can only get 10 for any table. How do I get them all?
Developer
Dec 3, 2008 at 2:38 PM
vik,

Can you be more specific? Which table are you seeing this issue occur in?

Lister
Coordinator
Dec 6, 2008 at 8:05 AM
Well vik,

Can you test that table using Net-SNMP or other SNMP tools? It is also possible that the agent on this SNMP device only implements part of that table so only 10 columns are returned.

Please get back here with your findings.

Thanks,

-Lex
Feb 2, 2009 at 6:41 AM
Hi Guys,

First off let me start by saying a BIG thank you for taking the time to put together this library. Have just started to using it and will now be changing my SNMP application to use this exclusivly. Berore i was using the the WMI version of SNMP from MS along with making calls to net-SNMP. Using this library is much much faster than what i was using before.

I am now exploring using the get table method with the library and have run into 2 issues:

1. The limmit that is mentioned above. I am querying a NETAPP storage device and on the Enclosure table there are attributes that are not filled in. These attributes aren't populated as they are only populated if there is an error such as a failed disk and such. It seems that my table is 32 columns wide, however the data is not returned  past column 15 as that is my first attribute that is blank. Is there a way that this information can still be returned even though this attribute is blank?

2. I am converting the sample code to VB.NET as that is what I program in. When converting the code however I get an error that & "String"(+ "String" in C#) is unknown. Here is an example of the code that I am using:

writer.Write(table[row, col].Data +

", "); = C# Code works fine.

 

writer.Write(table(row, col).Data &

", ") = I get the following exception: Error 1 Operator '&' is not defined for types 'Lextm.SharpSnmpLib.ISnmpData' and 'String'. C:\My Documents\Visual Studio 2005\Projects\SharpSnmp\SharpSnmp\Module1.vb 166 34 SharpSnmp

I have not tried this in VS2008 as of yet, but can.

Many thanks for any help you might be able to give here.

 

Coordinator
Feb 6, 2009 at 10:34 AM
Hi, sorry for this late response. Pretty busy week.

First let me answer the second question. C# compiler will automatically call ToString on Data field. So in VB.NET you may call ToString explicitly before & operation.

Second, let us visit the hardest thing. What about starting from the basic?

Tables in SNMP agents are retrieved by WALK operation (a sequence of GET NEXT message until it stops). Therefore, when you find the table result is incomplete, something must happen during WALK.

Like I suggested, capturing a Network Monitor log or Wireshark log can reveal the underlying communication. Having that at hand can help us trouble shoot the problem.

We plan to enhance SNMP table related features in Trident sprint. For CrossRoad, we will focus on other parts.

Regards,

-Lex
Marked as answer by lextm on 10/6/2013 at 9:07 PM