Monday, February 13, 2012

ADO 2.8 Is there any limitation on number of columns?

Hi,

I'm using ADO 2.8 in a vb.net code. The .Net framework version is 1.1 and windows server 2003.

I'm firing a query that result in 256 columns and few hundred rows. Here is the snapshot of the code

adoRs = New ADODB.Recordset

With adoRs

.CursorLocation = CursorLocationEnum.adUseClient ' adUseClient

.ActiveConnection = adoCn

.CursorType = CursorTypeEnum.adOpenStatic ' adOpenStatic

.LockType = LockTypeEnum.adLockBatchOptimistic ' adLockBatchOptimistic

.Open(strSQL)

End With

The returned record set is empty with all the the 256 columns name. Could anyone shed light why it is returning empty recordset. Is there any limitation on number of columns that a recordset can hold.

Thanks in advance.

With regards

Ganesh

Is it possible for you to try limiting the number of columns?
If it is, you could easily experiment and see whether adding additional columns to the resultset makes it to be empty or not.|||

It doesn't seem like you have a limitation on the number of columns because you do get all the columns back, just the entire recordset is empty. It could mean that the query doesn't return any results. Could you run your query in management studio to verify that it actually returns some rows that you are missing via ADO. If so, please include the query and we would be able to assist you further.

HTH,

|||

The Query return few hundred rows. I have checked that and there is nothing wrong with the query. In .Net 2.0 it returns some data in the recordset and it behaves abnormally.But our present environment is 1.1

With regards

Ganesh

No comments:

Post a Comment