100 Row Limit
Posted: Fri 07 Aug 2009 00:08
I have found by doing various queries, that the results are limited to 100 rows. With PgSqlCommand, I have found that I can get around the 100 rows limit by using the FetchAll but with LINQ and Entity I have not found any way to handle this. Can you tell me how to get past the 100 row limit with both LINQ and Entity? I have read someplace that you specify the rows return via the form object, but I am not using form objects, I am writing excel fields with results.
PgSqlCommand, This works for more then 100 Rows.
LINQ - Limit 100 Rows
Entity - Limit 100 Rows
Lloyd
PgSqlCommand, This works for more then 100 Rows.
Code: Select all
Dim conn As New PgSqlConnection()
Dim results As PgSqlCommand
results = conn.CreateCommand()
results.CommandText = SQL
results.FetchAll = True
pgReader = results.ExecuteReader()
For i = 1 To results.GetRecordCount()
pgReader.Read()
Next i
Code: Select all
Dim dbLINQ As New LoadRoleFTELINQContext.LoadRoleFTELINQContext(db.conn)
dbLINQ.Connection.Open()
Dim query = From it In dbLINQ.mpmybt_current_datas _
Order By it.employee_id, it.sup_id _
Select it
Dim comp As LoadRoleFTELINQ.mpmybt_current_data
MsgBox(query.Count()) ' Shows more than 100 rows.
For Each comp In query
MsgBox (comp.employee_id) ' Fails after the first 100 rows
Next comp
Code: Select all
Dim dbEF As New LoadRoleFTEEntity2.LoadRoleFTEEntityEntities
dbEF.Connection.ConnectionString = "metadata=res://*/LoadROleFTEEntity.csdl|res://*/LoadROleFTEEntity.ssdl|res://*/LoadROleFTEEntity.msl;provider=Devart.Data.PostgreSql;provider connection string="" & db.conn.ConnectionString & """
dbEF.Connection.Open()
Dim query = From it In dbEF.mpmybt_current_datas _
Order By it.employee_id, it.sup_id _
Select it
Dim comp As LoadRoleFTEEntity2.mpmybt_current_data
MsgBox(query.Count()) ' Shows more than 100 rows.
For Each comp In query
MsgBox (comp.employee_id) ' Fails after the first 100 rows
Next comp